您可以设置相关的注册表项,然后执行SendMessage来刷新今日屏幕。
-
HKEY\ U当前\用户\软件\微软\今日\皮肤
-
-
HKEY\ U CURRENT\ U USER\Software\Microsoft\Today\下的所有值(主题名称)
-
-
-
HKEY\ U LOCAL\ U MACHINE\Software\Microsoft\Color\下的所有值(ColorNumber)
-
C代码示例:
using System.Runtime.InteropServices;
using Microsoft.Win32;
...
[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;
// Copy wallpaper file to windows directory
File.Copy(@"\My Documents\My Pictures\ImageFileName.jpg", @"\Windows\stwater_240_240.jpg", true);
// Update registry
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Today", "Wall", "ImageFileName");
// Send message to refresh today screen
SendMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
有关更多详细信息,请访问:
http://windowsmobiledn.com/qa-how-to-install-a-today-theme-file/
http://windowsmobiledn.com/forum/viewtopic.php?t=335
http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/83a0420b-1c8f-4201-b910-693b3b9a3b12