Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Developing Pocket PC Applications In Visual Studio.NET  : Page 2

Microsoft's Visual Studio .NET 2003 ships with a new project template called "Smart Device Application," which lets you target the .NET Compact Framework to build PocketPC applications in almost exactly the same way you build Windows Forms applications.


advertisement
Figure 4. Populate the Windows Form with the various controls for the sample application.
Building the Sample Project
First, populate your Windows Form with the various controls (see Figure 4):

Next, insert the menu items shown in Figure 5 into the MainMenu1 control:

Here's a tip: Enter a hyphen (<span class="pf">-</span>) for the menu separator in the Translate menu item. A bug in the final beta prevents the separator from showing correctly (in fact the program crashes when you try to run it). The workaround is to rearrange the code generated by the Windows Form Designer as shown below:

Me.MenuItem5.MenuItems.Add(Me.MenuItem12) ' --move the following line after the Add method Me.MenuItem12.Text = "-"

Figure 5. The sample application requires these menu items.
Moving the statement containing the "-" assignment to just after the Add() method of the MenuItems object does the trick.

Adding Web References
The sample project in this article consumes three Web services:

Right-click the References item in the Solution Explorer, and then click the Add Web Reference item from the popup menu. Enter the URLs for the three Web services listed above into the URL field in the section of the Solution Explorer as shown in Figure 6.

After adding the Web References, your Solution Explorer should look like Figure 7:

Figure 6. Use the Add Web Reference dialog to add Web service references.
Figure 7. Here's how your Solution Explorer should look after adding the three Web service references.


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap