acpatel41
Aug 20th, 2001, 10:41 AM
i want to refresh desktop to change wallpaper ?
Hack
Aug 20th, 2001, 02:19 PM
Try something along these lines:
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal _
fuWinIni As Long) As Long
Dim ChangeIt As Long
Dim Wallpaper As String
'Replace 'c:\MyFile.bmp' with the name of your BMP File.
Wallpaper = "c:\MyFile.bmp"
ChangeIt = SystemParametersInfo(ByVal 20, vbnostring, ByVal Wallpaper, &H1)
If ChangeIt = 0 Then
MsgBox "Error changing wallpaper"
Exit Sub
End If