You can use the SystemParametersInfo:
Code:'Put this in a module Public Declare Function SystemParametersInfo Lib "user32.dll" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uiParam As Long, pvParam As Any, ByVal fWinIni As Long) As Long Public Const SPI_SETDESKWALLPAPER = 20 Public Const SPIF_SENDWININICHANGE = &H2 Public Const SPIF_UPDATEINIFILE = &H1 'use this in your program: dim retval as long dim picturepath as string picturepath = "c:\windows\clouds.bmp" retval = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, ByVal picturepath, SPIF_SENDWININICHANGE Or SPIF_UPDATEINIFILE)




Reply With Quote