pp18
7th July 2009, 05:16 PM
i'm wriiting a program to update the weather info (forecast_cache.db). to force M3D to read the updated weather data, at the end the program i'd like to force M3D (the today plug-in) to restart.
i tried the following codes. it worked sometimes but not always (no effect to the today screen).
rk_m3d = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Today\\Items\\TouchFLO 3D", true);
rk_m3d.SetValue("Enabled", 0, RegistryValueKind.DWord);
PostMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
// do some other calculation
rk_m3d.SetValue("Enabled", 1, RegistryValueKind.DWord);
PostMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
could somebody advise a better way to force restart of M3D (or just the Weather tab)?
thanks in advance.
i tried the following codes. it worked sometimes but not always (no effect to the today screen).
rk_m3d = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Today\\Items\\TouchFLO 3D", true);
rk_m3d.SetValue("Enabled", 0, RegistryValueKind.DWord);
PostMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
// do some other calculation
rk_m3d.SetValue("Enabled", 1, RegistryValueKind.DWord);
PostMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
could somebody advise a better way to force restart of M3D (or just the Weather tab)?
thanks in advance.