i want to refresh desktop to change wallpaper ?
Printable View
i want to refresh desktop to change wallpaper ?
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