VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change You Desktop Wall Paper from Visual Basic For Every 3 secs.

by subbu (3 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 18th March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Change You Desktop Wall Paper from Visual Basic For Every 3 secs.

API Declarations


''constants
Private Const SPI_SETDESKWALLPAPER = 20
Private Const SPIF_SENDWININICHANGE = &H2
Private Const SPIF_UPDATEINIFILE = &H1
Dim ctr As Integer

Rate Change You Desktop Wall Paper from Visual Basic For Every 3 secs.



' seconds according to user choice.
'Please make sure that the path of the file to be changed is correct.
Private Sub cmddefaultwallpaper_Click()
ret = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "(None)", SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub

Private Sub Form_Load()
Form1.WindowState = 1
ctr = 0
End Sub

Private Sub Timer1_Timer()
Dim ret As Long
Dim filename As String
ctr = ctr + 1
If ctr > 20 Then ctr = 1
' c:\photos folder holds bmp files from wall1.bmp to wall20.bmp.
filename = "c:\photos\wall" & ctr & ".bmp"
ret = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, filename, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub

Download this snippet    Add to My Saved Code

Change You Desktop Wall Paper from Visual Basic For Every 3 secs. Comments

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

Post your comment

Subject:
Message:
0/1000 characters