Configuring Visual Studio .NET
When you run mobile applications in Visual Studio .NET it will use Internet Explorer to test your code. If you are only targeting users of Pocket PC devices, that is quite sufficient. But if you are targeting cell phones users as well, then you also need to test your code using an emulator. For this article, I have used three ways of testing my application:
- Using Internet Explorer
- Using the Pocket PC 2002 emulator, downloaded from http://www.microsoft.com/mobile/downloads/emvt30.asp. The emulator is part of the embedded Visual Tools 3.0
- Using the WAP emulator from Openwave. (Though the latest emulator from Openwave is version 6, I still prefer the older version 4.0.) You can download the emulator from http://www.openwave.com.
Of course when you deploy your application, you need to test it on real devices. I have also tested the code in this article with a Compaq iPaq 3870 equipped with an 802.11b wireless access card.
To ensure that your emulator is launched every time you run your application, go to Solution Explorer and select the current project. Right click on the project name and select Properties. Then specify the path that contains your emulator in the "Start external program" textbox (see Figure 3).
As the UP.Simulator accepts command line arguments, you can specify the commands in the "Command line arguments" textbox. I am specifying the URL that the emulator should load when it is started:
However, I have noticed that this method doesn't always direct the emulator to open the page. In any case, you can enter the URL yourself through the "Go" textbox of the emulator. Another way to set the default browser is to go to Visual Studio's File menu and select the "Browse With" option to add in a new browser.