WinHEC Sample -- Dot Net Compact Framework

This sample was prepared by Paul Yao for presentation at the Microsoft WinHEC 2002 Conference in Seattle, Washington, USA in April of 2002.

What's In Here

This zip file contains four sample programs:
1) A .NET Web Service server (Hello),
2) A .NET Compact Framework Web Service Client (SayHello),
3) A Win32 text editor (Editor\Ed_Win32) and
4) A .NET Compact Framework text editor (Editor\Ed_NetCF). The original goal of these two samples was to provide a comparison of two exactly identical programs. However, limitations on the pre-beta .NET Compact Framework prevented this. In particular what was missing is support for the Clipboard and for modal dialog boxes. When the beta of the framework ships, I plan to update this sample to included those additional elements.

Hello

Technically speaking, this is not a .NET Compact Framework program. Instead, it is a Web Service program that runs on a web server. At WinHEC, Paul ran ASP.NET on a Windows 2000 (w/SP 2). The name of the computer Paul used was "dell_laptop", which is why you see that name in the Web Reference of the calling program - SayHello.

SayHello

This is a .NET Compact Framework program built to call the Hello web service. When the button is pushed, the function "HelloWorld" gets called in the HELLO web service on the web server system. Paul demoed this using a Pocket PC 2002 with Active Sync 3.5 - the version that lets a Pocket PC have network access.

Ed_Win32

The Win32 version of this program is essentially a clone of the NOTEPAD application. It creates an EDIT control, can read and write text files, and it also supports the Windows clipboard functions. Clipboard support is easy, since you just need to send messages - WM_CUT, WM_COPY, and WM_PASTE - to the edit control and it does all the real work of accessing the clipboard. There are around 500 lines of code - most of it to support the basic infrastructure of a Win32 program.

Ed_NetCF

This sample was created using Build 2079 of the Microsoft Smart Device Extensions for Visual Studio .NET. The most important enhancement that this new version provides is support for the Forms Designer, which gives C# and VB.NET programmers the ability to draw dialog-style windows.

One item that is missing is support for the Clipboard. I ended up putting some code in to support this, bracketed by an #if statement using the COMPLETE_FRAMEWORK preprocessor symbol (yes, I know there is no longer a preprocessor - but everyone knows what that term means so I suspect I'll use it forever).

Another item that is missing is support for modal dialogs. I needed this just for the About box, and since it was missing I just used a plain and simple message box.