VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change You Desktop Wall Paper from Visual Basic.

by Rajender Sharma (7 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 22nd November 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Change You Desktop Wall Paper from Visual Basic.

API Declarations



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

'constants

Public Const SPIF_SENDWININICHANGE = &H2
Public Const SPIF_UPDATEINIFILE = &H1
Public Const SPI_SETDESKWALLPAPER = 20


Rate Change You Desktop Wall Paper from Visual Basic.




Private Sub cmdChangeWallPaper_Click()
Dim ret As Long
ret = SystemParametersInfo(SPIF_SETDESKWALLPAPER, 0&, "c:\windows\bubble.bmp", SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub

Private Sub cmdClearWallpaper_Click()
ret = SystemParametersInfo(SPIF_SETDESKWALLPAPER, 0&, "(None)", SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub


Download this snippet    Add to My Saved Code

Change You Desktop Wall Paper from Visual Basic. Comments

No comments have been posted about Change You Desktop Wall Paper from Visual Basic.. Why not be the first to post a comment about Change You Desktop Wall Paper from Visual Basic..

Post your comment

Subject:
Message:
0/1000 characters