Tuesday, July 14, 2009

Developing using C# for Windows Mobile Suddenly Got Easier

I complained Microsoft did not make all the GDI and Win32 equivalent for C#. Well they are. Microsoft just didn't bother to make it easy to find. For me, it took a couple of days of searching before I stumbled on this great article: Optimize Your Pocket PC Development with the .NET Compact Framework. The title does not sound that important. This article gives you lots and lots of code you need if you want to develop using C# on Windows Mobile. For example, it provides a mapping of a large number of Win32 equivalent calls providing all the P/Involk code, constants, and enumerations. It also provides a Gdi class that maps a lot of the GDI calls. I wish I had found this article a couple of days ago.

The article does not describe everything included in the source code. It contains libraries Brushes, Fonts, Font Cache, GDI, Pens, the Registry, and Win32 calls. If you are developing for Windows Mobile and using C# you need to download the source code and look at all the hidden goodies.

No comments: