Change You Desktop Wall Paper from Visual Basic For Every 3 secs.
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.
(2(2 Vote))
' 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
Change You Desktop Wall Paper from Visual Basic For Every 3 secs. Comments
No comments yet — be the first to post one!
Post a Comment