|
-
Sep 4th, 2006, 08:34 PM
#1
Thread Starter
Hyperactive Member
wallpaper and screen saver
hi i am new in API and i dont know what is the wrong with this code ??
the wallpaper is working only on bmp file format and i tried jpg and it didn't work.
and to the screen saver it didn't work at all.
this is the code:
Private 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
Const SPI_SETSCREENSAVETIMEOUT = 15
Const SPI_SETSCREENSAVEACTIVE = 17
Const SPI_SETDESKWALLPAPER = 20
Const SPIF_UPDATEINIFILE = &H1
Sub screen()
SystemParametersInfo SPI_SETSCREENSAVEACTIVE, True, cdl.FileName, SPIF_UPDATEINIFILE
End Sub
Sub wallpaper()
SystemParametersInfo SPI_SETDESKWALLPAPER, 0, cdl.FileName, SPIF_UPDATEINIFILE
End Sub
Private Sub cmdscreen_Click()
cdl.Filter = "screen|*.scr"
cdl.ShowOpen
screen
End Sub
Private Sub cmdwallpaper_Click()
cdl.Filter = "bmp|*.bmp"
cdl.ShowOpen
wallpaper
End Sub
-
Sep 10th, 2006, 06:26 AM
#2
-
Sep 10th, 2006, 06:29 AM
#3
-
Sep 10th, 2006, 06:49 PM
#4
Thread Starter
Hyperactive Member
Re: wallpaper and screen saver
man
this thread http://www.vbforums.com/showthread.php?t=426274 is mine too
cause i wrote it twice
once here in API FORUMS
and second in VB Classic forum
but thx anyway
-
Sep 11th, 2006, 05:51 PM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|