Antialisasing and .NETCF

On the newsgroup, a developer asked if it was possible to use antialiasing on a Label font. By default on Windows Mobile the text does not use antialiasing unless you turn on the global ClearType option under Settings > System > Screen > ClearType. The platform has the capability to smooth fonts, we just need […]

Exception Messages on .NETCF v3.5

Martijn Hoogendoorn provides a description of how to avoid the message:- “An error message is available for this exception but cannot be displayed because these messages are optional and are not currently installed on this device. Please install ‘’ for Windows Mobile 5.0 and above or  ‘’ for other platforms. Restart the application to see […]

How To: Programmatically Scroll Controls

A number of controls within .NETCF have built in ScrollBars. Occasionally you may want to operate these programmatically on behalf of the user. When you do this you want both the control to scroll and the scrollbars to correctly reflect the current position. Faced with this requirement I found a solution in the WM_VSCROLL (and […]

HttpWebRequest Exceptions under .NETCF

While testing code using HttpWebRequest it can be observed in the debug output that a number of exceptions are thrown within the GetResponse call of a HttpWebRequest. If you run exactly the same code on the desktop you don’t see this behaviour. For reference the following is a simple example which displays the issue:- System.Net.WebRequest […]

Determine Platform – .NETCF 3.5 and earlier

One of the new features in v3.5 of the Compact Framework is the ability to easily detect the platform you are running on from Smartphone (Standard Edition), PocketPC (Classic or Professional Editions) or WinCEGeneric (Everything else). The code is very straight-forward:- using Microsoft.WindowsCE.Forms;if(SystemSettings.Platform == WinCEPlatform.Smartphone){   //do something smartphone specific…}  In the latest (v3.0) version of Mobile […]

New Networking Component

In The Hand Ltd today released Networking In The Hand, a developer library for the .NET Compact Framework 2.0 and 3.5 Beta. This library adds additional networking functionality not found in in the Compact Framework while matching the object model used in the full .NET framework to make it easy to share your code between […]

System.Media.SoundPlayer versus the PlaySound API

In .NETCF v3.5 there is a new namespace – System.Media which brings audio support to the Compact Framework. Previously the common way to add sounds to your application was to use the PlaySound API (either P/Invoking yourself or using one of many wrappers). Now that the framework itself has built-in support, which matches the desktop […]

Multiline Button

On the newsgroup somebody asked how to have multiple lines of text on a .NETCF Button control. The native control supports this but the appropriate style is not set by default. The following code snippet shows how to enable this:- private const int BS_MULTILINE = 0x00002000;private const int GWL_STYLE = -16;[System.Runtime.InteropServices.DllImport(“coredll”)]private static extern int GetWindowLong(IntPtr […]