Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleChange the desktop wallpaper
Keywordswallpaper, desktop, SystemParametersInfo
CategoriesWindows, 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
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated