Hi,
I'm looking for a way to change the desktop wallpaper on Windows CE from Visual Basic 2005. After a lot of digging, the only solution I've found is shown below, but it doesn't work:
SystemParametersInfo returns 0. I've tried setting the wallpaper to "(None)" and that has the same result. The "wallpaper.bmp" file exists, and I'm able to set the wallpaper to that manually on the device. I'm aware that SystemParametersInfo seems to only work with bmp files, but that won't be an issue if I can just get it working.. or is there an alternative method?Code:Public Declare Function SystemParametersInfo Lib "Coredll.dll" (ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) As Integer Public Const SPI_SETDESKWALLPAPER As System.UInt32 = &H14 Public Const SPIF_UPDATEINIFILE As System.UInt32 = &H1 Public Const SPIF_SENDWININICHANGE As System.UInt32 = &H2 Sub Main() SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "\Windows\wallpaper.bmp", SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE) End Sub
Thanks




Reply With Quote