Foreword
The .NET Compact Framework is a very trimmed down version of the .NET Framework. Some of the capabilities removed simply don't apply to the CF because of the limited display space of so-called "smart devices." Some of the capabilities that were removed would have been helpful, but they weren't anything crucial. And then, one has to wonder
why some of the other capabilities were removed.
To make anything more than the most basic application will usually require custom controls to make it function as desired.
PropertyControl uses four:
BCScrollPanel, for scrollable panels,
BCHyperlink, since the system
Label does not support clicking,
BCTextBox, for validation of numbers, and
BCComboBox, for a better combobox. In order to create custom controls that are visible in the Form Designer, a design-time version of the control has to be created that uses DLL's that the Form Designer can deal with. This design-time version can only be built with C#.
Features/Bugs
- If one uses a brush based on a control's forecolor to draw text, a pen based on that same color will be unable to draw over the text.
- Slightly modifying the color of the pen solves this problem.
- A form is visible in the running programs list if its text is not zero-length. If you want only the active form to be visible in the running programs list, you must have only one form open that has a non-zero text length. E.g., when switching from one form to another (and keeping both loaded in memory), you have to set the Text property of the previous form to null/Nothing or "", and the Text property of the current form to whatever your application is called.
Deploying .NET Applications to the PocketPC
Visual Studio.NET and Microsoft ActiveSync are required to deploy .NET applications to the PocketPC.
- Establish a connection between ActiveSync and the PocketPC, either by placing it in the cradle, or making a link on the network if you're using wireless.
- Open the specified solution in the VS.NET IDE by double-clicking on the solution file.
- Ensure that the application being deployed is not open on the PocketPC, or deployment will fail.
- Ensure that the IDE is set to deploy to the PocketPC and not the emulator by choosing Tools|Options, the Device Tools folder, and the Devices item. "Pocket PC Device should be selected", not "Pocket PC 2002 Emulator".
- Click OK.
- Choose Build|Deploy Solution.
If all goes well, you should see something like this in the output window at the bottom of the screen (Ctrl-Alt-O if you do not see it):
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
Deploy: 1 succeeded, 0 failed, 0 skipped
If you do not see this, scroll up – either there are errors in the source code, a connection to the PocketPC could not be established, or the program is open on the PocketPC and cannot be deployed.