I am developing an application in which I want to set images as the wallpaper. For that I have written the below code. When I use remote registry, the in-registry value gets updated but the wallpaper of the Windows mobile device does not change.
[DllImport("coredll.dll")]
private static extern int SendMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
public const int HWND_BROADCAST = 0xffff;
public const int WM_WININICHANGE = 0x001A;
File.Copy(@"\My Documents\My Pictures\Album Sample_05.jpg", @"\My Documents\My Pictures\Album Sample_09.jpg", true);
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Today", "Wall", @"\My Documents\My Pictures\Album Sample_05.jpg");
SendMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);