Hi Gang
I am trying to use SPIF_SENDCHANGE to case my windows desktop to refresh in win98. I dont really know what the value of this constant is but I think it is supposed to be 2. When I run my code the value returned is 'Empty'. Here are the relevant lines of code that I have.
Private Declare Function SystemParametersInfo Lib "user32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
ByVal lpvParam As String, ByVal fuWinIni As Long) As Long
errorlocation = SetKeyValue(HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Desktop\General\", "Wallpaper", "C:\wallpaper\" & FileName & ".jpg", REG_SZ)
errorlocation = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "C:\wallpaper\" & FileName & ".jpg", SPIF_SENDCHANGE)
I know that the SetKeyValue is functioning properly, whne I right click the resktop and click refresh, the wallpaper changes.
Any ideas on what I am doing wrong would be greatly appreiciated.
Ken
I am trying to use SPIF_SENDCHANGE to case my windows desktop to refresh in win98. I dont really know what the value of this constant is but I think it is supposed to be 2. When I run my code the value returned is 'Empty'. Here are the relevant lines of code that I have.
Private Declare Function SystemParametersInfo Lib "user32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
ByVal lpvParam As String, ByVal fuWinIni As Long) As Long
errorlocation = SetKeyValue(HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Desktop\General\", "Wallpaper", "C:\wallpaper\" & FileName & ".jpg", REG_SZ)
errorlocation = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "C:\wallpaper\" & FileName & ".jpg", SPIF_SENDCHANGE)
I know that the SetKeyValue is functioning properly, whne I right click the resktop and click refresh, the wallpaper changes.
Any ideas on what I am doing wrong would be greatly appreiciated.
Ken