|
|
Title | Change the desktop wallpaper |
Keywords | wallpaper, desktop, SystemParametersInfo |
Categories | Windows, Utilities |
|
|
Use the SystemParametersInfo API function. If the final parameter is SPIF_UPDATEINIFILE, the change is made permanently in the system INI file. If this parameter is 0, the wallpaper is temporary and not redisplayed the next time you boot.
My book Custom Controls Library includes several controls that manipulate this and other system properties like cursor blink rate, double click speed, and so forth.
|
|
Private Sub cmdSetWallpaper_Click()
Dim upd As Integer
If chkUpdateRegistry.Value = vbChecked Then
upd = SPIF_UPDATEINIFILE
Else
upd = 0
End If
SystemParametersInfo SPI_SETDESKWALLPAPER, _
0, txtFileName, upd
End Sub
|
|
|
|
|
|