New home screen available in Windows Mobile 6.5 should be refreshed differently for Professional and Standard editions of OS. It can be done using the same API methods as for earlier versions of Windows Mobile.
For Professional edition it can be done like this:
[DllImport("coredll.dll")]
private static extern IntPtr PostMessage(int hWnd, int msg, uint wParam, uint lParam);
private const int HWND_BROADCAST = 0xFFFF;
private const int WM_WININICHANGE = 0x001A;
public static void Refresh() {
PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
}
For Standard edition the trick is to provide correct GUID to API. This GUID can be found in SlidingPanel.home.xml file located in “\Application Data\Home” folder. Here is the code:
[DllImport("aygshell.dll")]
public extern static uint SHOnPluginDataChange(ref Guid clsid);
public static void Refresh() {
Guid guid = new Guid("{E9267CAB-02EE-4f37-8216-6BF6A8FF5A71}");
SHOnPluginDataChange(ref guid);
}