Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.

Slides:



Advertisements
Similar presentations
Microsoft Office 2010 Office 2010 and Windows 7: Essential Concepts and Skills Mark Worden Instructor Use your spacebar or down arrow key to advance slides.
Advertisements

Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Excel Project 7 Using Macros and Visual Basic for Applications (VBA) with Excel.
Using Macros and Visual Basic for Applications (VBA) with Excel
Microsoft Office 2007 Excel Web Feature Creating Web Pages Using Excel.
Chapter 5 Multitable Forms
Microsoft Office 2007 PowerPoint Web Feature Creating Web Pages Using PowerPoint.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Chapter 1 Databases and Database Objects: An Introduction
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 2 Querying a Database Using the Select Query Window.
Office 2003 Introductory Concepts and Techniques, 2 nd Edition M i c r o s o f t Windows XP Project Introduction to Microsoft Windows XP and Office 2003.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Microsoft Visual Basic 2012 CHAPTER TEN Incorporating Databases with ADO.NET.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 3 Maintaining a Database Using the Design and Update Features of Access.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Office XP Introductory Concepts and Techniques Windows XP Edition M i c r o s o f t Windows XP Project An Introduction to Windows XP Professional and Office.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Microsoft Office 2010 Office 2010 and Windows 7: Essential Concepts and Skills.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2012 CHAPTER TWELVE (ENRICHMENT CHAPTER) Windows Store Apps.
Chapter 3 Maintaining a Database
Microsoft Office 2007 Access 2007 Chapter 9 Administering a Database System.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Microsoft Visual Basic 2005 CHAPTER 5 Mobile Applications Using Decision Structures.
Office 2013 and Windows 8: Essential Concepts and Skills
Chapter 1 Databases and Database Objects: An Introduction
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Windows 7 Essential Introduction to Windows 7.
Microsoft Office 2007 PowerPoint Web Feature Creating Web Pages Using PowerPoint.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Web Feature Data Access Pages.
Microsoft Windows Vista Chapter 1 Fundamentals of Using Microsoft Windows Vista.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Access 2013.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Microsoft Windows 7 Part 1 Fundamentals of Using Windows 7.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Microsoft Office XP Illustrated Introductory, Enhanced Started with Windows 2000 Getting.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Microsoft Office 2010 is the newest version of Microsoft Office, offering features that provide users with better functionality and easier ways to work.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
Creating and Editing a Web Page
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Office 2013.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 11 Creating Web Applications and Writing Data to a Database.
Integrating Office 2003 Applications and the World Wide Web
Access Chapter 2 Querying a Database.
Incorporating Databases with ADO.NET
Enhancing Forms with OLE Fields, Hyperlinks, and Subforms
Using Procedures and Exception Handling
Office 2010 and Windows 7: Essential Concepts and Skills
Incorporating Databases with ADO.NET
Chapter 7 Advanced Form Techniques
Variables and Arithmetic Operations
Presentation transcript:

Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services

12 Chapter 12: Cell Phone Applications and Web Services2 Objectives ►Create a Smartphone application ►Use a cell phone keypad for input ►Enter input using a Smartphone ►Enter other characters using the keypad ►Add Smartphone Toolbox objects

12 Chapter 12: Cell Phone Applications and Web Services3 Objectives ►Create a softkey menu ►Code the Smartphone application ►Display MessageBox objects in a Smartphone environment ►Find Web services

12 Chapter 12: Cell Phone Applications and Web Services4 Objectives ►Create a Web service connection ►Call a Web service method ►Create a Crystal report ►Display a Crystal report

12 Chapter 12: Cell Phone Applications and Web Services5 Introduction

12 Chapter 12: Cell Phone Applications and Web Services6 Creating a Smartphone Application ►With Visual Studio 2005 open, click the New Project button on the Standard toolbar, click Smart Device in the Project types pane on the left side of the New Project dialog box, and then, if necessary, click the plus sign next to Smart Device ►Click Smartphone 2003 under Smart Device in the Project types list. In the Templates pane, click Device Application (1.0) ►In the Name text box, change the name of the Smart Device application from DeviceApplication1 to TipCalculator. Click the OK button

12 Chapter 12: Cell Phone Applications and Web Services7 Creating a Smartphone Application

12 Chapter 12: Cell Phone Applications and Web Services8 Entering Input Using a Smartphone ►With the TipCalculator application open, name the Form object frmTip.vb. Title the Form object by changing the Text property to Tip Calculator. Add a Label object to the form named lblBillAmount. Change the Text property of the Label object to Amount of Bill. Drag a TextBox object under the Label object. Name the TextBox object txtBill. Clear the Text property. Resize the Label object to fit the text exactly. Center the Label and TextBox objects horizontally on the form ►Run the Smartphone application by clicking the Start Debugging button on the Standard toolbar ►Make sure Smartphone 2003 SE Emulator is selected, and then click the Deploy button ►To enter the bill amount of 75.22, press the 7 key on the keypad five times quickly. The letter “p” appears first, then the letter “q,” then the letter “r,” then the letter “s,” and lastly the number “7”. Next, press the 5 key on the keypad four times quickly to enter the number 5

12 Chapter 12: Cell Phone Applications and Web Services9 Entering Input Using a Smartphone ►To enter the decimal point, hold the # key in the lower- right corner of the keypad until the Symbols window opens ►To enter the decimal point, press the navigation keys, such as the right ARROW KEY and DOWN ARROW key, to move to the decimal point (period) in the Symbols window. To select the decimal point, press the Action key in the center of the navigation keys. Enter the digits 22 by first pressing the 2 key four times quickly. Wait a few seconds and press the 2 key four times quickly again to display the second 2 ►To close the application, click the Close button in the upper-right corner of the program window ►Click the No button, and then click the OK button

12 Chapter 12: Cell Phone Applications and Web Services10 Entering Input Using a Smartphone

12 Chapter 12: Cell Phone Applications and Web Services11 Adding Smartphone Toolbox Objects ►If necessary, open the TipCalculator application, which includes the first Label and TextBox object on the form. Drag a second Label object named lblPercentage to the form below the TextBox object. Change the Text property to Tip Percentage. Drag the ComboBox object to the Form object below the second label. Name the ComboBox object cboTipPercent. Click the ellipsis button to the right of the Items property. Enter the three tip percentage amounts into the String Collection Editor: 10% (press ENTER), 15% (press ENTER), and 20%. Resize the objects to the exact size of the text. Center both the Label and ComboBox objects on the center of the form

12 Chapter 12: Cell Phone Applications and Web Services12 Adding Smartphone Toolbox Objects ►Run the Smartphone application by clicking the Start Debugging button on the Standard toolbar. In the Deploy TipCalculator window, make sure the Smartphone 2003 SE Emulator option is selected, and then click the Deploy button. When the Smartphone emulator opens and loads the application, enter in the first TextBox object using the keypad. To move to the ComboBox object for input, click the down arrow key on the navigation keypad. To view the ComboBox items, click the right arrow on the navigation keypad; 10% is displayed in the ComboBox object. Click the right arrow again to view 15%. Select the 15% tip percentage by clicking the Action button in the center of the navigation keypad. Close the Smartphone emulator without saving the emulator state

12 Chapter 12: Cell Phone Applications and Web Services13 Adding Smartphone Toolbox Objects

12 Chapter 12: Cell Phone Applications and Web Services14 Creating a Softkey Menu ►On the frmTip Form object of the TipCalculator application, click the left side of the Command control area ►Type Compute Tip in the Command control area. Press ENTER. Use the (Name) property to name the Command control area mnuComputeTip

12 Chapter 12: Cell Phone Applications and Web Services15 Coding the Smartphone Application ►In the TipCalculator application, double-click the mnuComputeTip Command control area in the lower-left corner of the Smartphone Form object ►Enter the code shown on the following slide to compute the tip for the restaurant bill amount

12 Chapter 12: Cell Phone Applications and Web Services16 Coding the Smartphone Application

12 Chapter 12: Cell Phone Applications and Web Services17 Program Design

12 Chapter 12: Cell Phone Applications and Web Services18 Program Design

12 Chapter 12: Cell Phone Applications and Web Services19 Designing the Program Processing Objects

12 Chapter 12: Cell Phone Applications and Web Services20 Finding Web Services ►With a new Windows Form object open with the project name CurrencyConverter, right-click the project name CurrencyConverter in the Solution Explorer ►Select Add Web Reference on the shortcut menu ►Enter the following Web service URL in the URL text box: dl. Then click the Go button to connect to the Web service. You must be connected to the Internet to find the Web service. If the Web service is available online, a message appears stating the name of the method that will be used in the code window to call the existing Web service ►Click the Add Reference button in the Ad Web Reference window

12 Chapter 12: Cell Phone Applications and Web Services21 Finding Web Services

12 Chapter 12: Cell Phone Applications and Web Services22 Creating a Web Services Connection ►After creating the Web reference, open the code window to create an instance of the Web service class. To create an instance named wsMoney (where ws stands for Web service), type Dim wsMoney as New net. You include the word net because the Web reference listed in the Solution Explorer begins with the name net ►To complete the name of the Web service, type a period and webservicex appears in the IntelliSense window. Select webservicex, type a period, and www appears in the IntelliSense window. Select www and type another period ►Select the Web service named CurrencyConvertor in the IntelliSense window. Press the ENTER key

12 Chapter 12: Cell Phone Applications and Web Services23 Creating a Web Services Connection

12 Chapter 12: Cell Phone Applications and Web Services24 Calling a Web Service Method ►In the code window, assign a Double data type variable named dblConversionAmount. The data type is assigned as a Double because the Web reference stated that the return type is a Double data type ►The variable dblConversionAmount is assigned to the returned value from the calling method ConversionRate. ConversionRate is method of the instance of wsMoney. Type dblC and press CTRL+SPACEBAR to complete the variable dblConversionRate. Type = wsMoney. An IntelliSense list opens. Select ConversionRate, and then type a left parenthesis ( ►To convert U.S. dollars to euros, scroll down the list of first arguments and select net.webservicex. Type a comma and the second list of arguments appears. Scroll down the list of second arguments and select net.webservicex. for euros. Type a closing parenthesis

12 Chapter 12: Cell Phone Applications and Web Services25 Calling a Web Service Method

12 Chapter 12: Cell Phone Applications and Web Services26 Program Design

12 Chapter 12: Cell Phone Applications and Web Services27 Program Design

12 Chapter 12: Cell Phone Applications and Web Services28 Designing the Program Processing Objects

12 Chapter 12: Cell Phone Applications and Web Services29 Crystal Reports: Creating a Report ►Open Visual Studio using the Start button on the Windows taskbar and the All Programs submenu. Click the New Web Site button on the Standard toolbar. In the list of Visual Studio installed templates, click ASP.NET Web Site. Name the sample report PhysicianReferral. Click the OK button ►Right-click the project name PhysicianReferral in the Solution Explorer, and then click Add New Item on the shortcut menu. When the Add New Item window opens, click Crystal Report in the list of installed templates ►Click the Add button

12 Chapter 12: Cell Phone Applications and Web Services30 Crystal Reports: Creating a Report ►Click the OK button. Download the database named physicians.mdb from the scsite.com/vb2005/ch12 to a removable disk, such as a USB drive. Click the plus sign in front of Create New Connection to expand the options. Click the plus sign in front of Database Files. Browse to the physicians.mdb database and select the file. Click the Open button. Select the PhysicianList table and then click the Add (>) button in the center of the window ►Click the Next button. In the Fields dialog box of the Standard Report Creation Wizard, hold down the CTRL key and select the Physician Name, City, State, and Specialty fields. Click the Add (>) button in the center of the form ►Click the Next button. Click the Next button again to create a report without any groupings. Click the Next button again to create a report without a summary. If necessary, click the Next button again to create a report without any subsets. In the Report Style window, select the Red/Blue Border style ►Click the Finish button

12 Chapter 12: Cell Phone Applications and Web Services31 Crystal Reports: Creating a Report

12 Chapter 12: Cell Phone Applications and Web Services32 Displaying the Report ►Click the Default.aspx tab to open the Web form. Open the Crystal Reports category on the Toolbox by clicking the plus sign to expand the Crystal Reports category. Drag the CrystalReportViewer object onto the Default.aspx Web form ►If necessary, click the action button on the CrystalReportViewer object, and then click the Choose Report Source list arrow. Select. The Create Report Source window opens. Click the Specify Crystal Report for the CrystalReportSource control list arrow, and then select CrystalReport.rpt ►Click the OK button. Click the Start Debugging button on the Standard toolbar to execute the Web page. On the Debugging Not Enabled window, click the OK button

12 Chapter 12: Cell Phone Applications and Web Services33 Displaying the Report

12 Chapter 12: Cell Phone Applications and Web Services34 Summary ►Create a Smartphone application ►Use a cell phone keypad for input ►Enter input using a Smartphone ►Enter other characters using the keypad ►Add Smartphone Toolbox objects

12 Chapter 12: Cell Phone Applications and Web Services35 Summary ►Create a softkey menu ►Code the Smartphone application ►Display MessageBox objects in a Smartphone environment ►Find Web services

12 Chapter 12: Cell Phone Applications and Web Services36 Summary ►Create a Web service connection ►Call a Web service method ►Create a Crystal report ►Display a Crystal report

Microsoft Visual Basic 2005 CHAPTER 12 COMPLETE Cell Phone Applications and Web Services