Default Name NameType of ControlOther Properties to Set from (in Figure 11-12)Properties DialogTextBox12txtRegionText BoxText = [blank] Set corresponding label textproperty to State/Region: TextBox13txtPostalCodeText BoxText = [blank] Set corresponding label textproperty to Postal Code: TextBox14txtWorkPhoneText BoxText = [blank] Set corresponding label textproperty to Work Phone: TextBox15txtHomePhoneText BoxText = [blank] Set corresponding label textproperty to Home Phone: TextBox16txtCellPhoneText BoxText = [blank] Set corresponding label textproperty to Cell Phone: TextBox17txtWorkEmailText BoxText = [blank] Set corresponding label textproperty to Work Email: TextBox18txtHomeEmailText BoxText = [blank] Set corresponding label textproperty to Home Email: TextBox19txtNotesText BoxText = [blank] Set multiline property to True. Set scrollbar property to Vertical. Set corresponding label textproperty to Notes: LinkLabel1lnklblGoogleResultsLink LabelText = [blank] Set border style property toFixed3D. Set corresponding label textproperty to Top Results FromGoogle: 12.At this point, the screen should appear similar to the one shown in Figure 11-13.13.Save your changes. 14.Add a new form. To do so, select Project.Add Windows Form. Specify Windows Form for and frmMap.vbas the Name. An example is illustrated in Figure 11-14.235Case
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Default Name NameType of ControlOther Properties to Set from (in Figure 11-12)Properties DialogButton8btnSearchButtonText = Search Button9btnGetMapButtonText = Get Map Button10btnGetDirectionsButtonText = Get Directions TextBox1txtSearchLNameText BoxText = [blank] Set corresponding label textproperty to Last Name: TextBox2txtSearchCompanyText BoxText = [blank] Set corresponding label textproperty to Company: TextBox3txtContactIdText BoxText = [blank] Set read-only property to True. Set corresponding label textproperty to Contact ID: TextBox4txtLNameText BoxText = [blank] Set corresponding label textproperty to Last Name: TextBox5txtFNameText BoxText = [blank] Set corresponding label textproperty to First Name: TextBox6txtMNameText BoxText = [blank] Set corresponding label textproperty to Middle Name: TextBox7txtTitleText BoxText = [blank] Set corresponding label textproperty to Title: TextBox8txtCompanyText BoxText = [blank] Set corresponding label textproperty to Company: TextBox9txtAddress1Text BoxText = [blank] Set corresponding label textproperty to Address 1: TextBox10txtAddress2Text BoxText = Set corresponding label textproperty to Address 2: TextBox11txtCityText BoxText = [blank] Set corresponding label textproperty to City: 234Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
7.Type frmContacts.vband press Enter to change the name. At this point, you should save and run the project to make sure there are no errors. If you receive anerror that Sub Main was not found in Form1, you will next be prompted to specify a form to useinstead. Select frmContacts from the list. 8.Change the Name property of the form to frmContacts. Change the Textproperty of the formto Contacts. Change the Sizeproperty of the form to 800,600.9.Add the following controls to frmContacts: 4 group boxes, 8 buttons, 2 labels, and 2 text boxes. Arrange the controls as shown in Figure 11-11. Figure 11-1110.Within the fourth group box, add the following controls: 18 labels, 17 text boxes, 1 link label, and 2 buttons. Arrange the controls as shown in Figure 11-12.232Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services
Figure 11-1211.Rename the Nameproperty and the other specified Properties for each of the controls as in table: Default Name NameType of ControlOther Properties to Set from (in Figure 11-12)Properties DialogGroupBox1grpNavigationGroup BoxText = Record Navigation GroupBox2grpDataUpdateGroup BoxText = Manage Contact Data GroupBox3grpSearchGroup BoxText = Lookup Contact GroupBox4grpContactGroup BoxText = Contact Information Button1btnMoveFirstButtonText = First Button2btnMovePreviousButtonText = Previous Button3btnMoveNextButtonText = Next Button4btnMoveLastButtonText = Last Button5btnSaveButtonText = Save Button6btnAddNewButtonText = New Button7btnDeleteButtonText = Delete Table continued on following
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services
5.Change the Location to the directory where you want to store the project. An example of howthe screen should appear at this point is shown in Figure 11-9. Figure 11-96.Change the name Form1.vbto frmContacts.vb. To do so, select Form1.vbfrom the SolutionExplorer, right-click, and from the pop-up menu select Rename, as shown in Figure 11-10. Figure 11-10231Case
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services
Let s jump right into building the sample application so you can try it out for yourself. As with all the code examples in this chapter, you can download the entire case study in Visual Basic.NET or C# from the Wrox Web site as discussed in the Introduction. In order for the downloaded ver- sion of the case study to work, you will need to refresh the Web references to the Google API and theMicrosoft MapPoint API from Visual Studio .NET by selecting the particular Web reference and choos- ing the refresh option. You will also need to specify your own account credentials in the source codewhere indicated. Building the ProjectIn this section, you build the Microsoft Access database and then use Visual Studio .NET to create theuser interface and code to interact with the database. Let s start with building the database. Build the DatabaseIn order to create the database for the CRM case study, you need Microsoft Access. Thus, open MicrosoftAccess and perform the following steps to create the CRM database. 1.Select File.New.Blank Database. 2.Navigate to folder where you want to store the database. 3.Specify CRMfor the file name. 4.Double-click Create table in design view as shown in Figure 11-4. Figure 11-45.Create a Contacts table with the fields and data types as shown in Figure 11-5. 6.Change the FieldSizeproperty of each field to the value shown in the Description field. Anexample of how to change the FieldSizeproperty for the LastName field is shown in Figure 11-6.228Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Figure 11-5Figure 11-67.Set the ContactId field as the primary key. To do so, select the ContactId field, right-click, andfrom the pop-up menu, select Primary Key, as shown in Figure 11-7.8.Next, double-click on the table to open it. Add some sample data, such as shown in Figure
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Figure 11-2Figure 11-3227Case
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services
The CRM Application is designed to allow users to track customers and potential customers. TheApplication stores the data in a Microsoft Access database and has the following features: .It enables the user to add, update, and delete contact information for a specified contact. Contact information includes the traditional Name, Address, Phone, and E-mail fields, as wellas a Notes field so the user can make notes about each conversation with him or her. .It allows the user to navigate among the contact records to search for a specified contact recordby last name and/or company upon request. .When the user opens a particular contact record, the application uses the Google API to retrievethe first five sites that mention this customer. These results display in a Google box so the userlearns more about the customer before calling him or her. If a company name is specified for thecontact, the Web pages mentioning that company are also displayed. If no company name isspecified, the Web pages mentioning the person are displayed. An example of the Google Boxfeature is illustrated in Figure 11-1. Figure 11-1 .Upon request of the user, the Microsoft MapPoint API retrieves a map of the contact s city andstate/region. An example of the Get Map screen is shown in Figure 11-2. .Upon request of the user, the Microsoft MapPoint API retrieves driving directions to the cus- tomer s location from a specified starting position that the user provides when prompted. Anexample of the Get Directions screen is shown in Figure 11-3.226Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services