Results 1 to 3 of 3

Thread: [RESOLVED] Changing Windows CE 5.0 desktop wallpaper

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    11

    [RESOLVED] Changing Windows CE 5.0 desktop wallpaper

    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:

    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
    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?

    Thanks
    Last edited by PaxPsychosis; Feb 10th, 2009 at 05:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width