View Single Post
Old 04-02-2003, 11:13 PM   #1 (permalink)
D.Viddy
Newb Techie
 
Join Date: Apr 2003
Posts: 11
Lightbulb Expanding This Forum...(Programmers Unite)

Let's all post some of our favorite code snippets for any language we choose. Be sure to label what it does and add any extra info that would be required. I'll start...

Language: Visual Basic 6.0
Purpose: Change the Windows Wallpaper


Code:
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _ 
(ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long As Long

Public Const SPI_SETDESKWALLPAPER = 20

Public Sub ChangePaper(strFilename as string)
   Dim lngSuccess As Long

   lngSuccess = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, strFilename, 0)
End Sub

- Please Post...
D.Viddy is offline   Reply With Quote