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
Re: wallpaper and screen saver
To change the current screen saver it's not an API call you need like that. I think it's slightly different depending on the OS version. But it's more the style of changing an ini file or the registry.
Re: wallpaper and screen saver
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
Re: wallpaper and screen saver
Didn't notice the dates or the poster... I guess this is proof why people shouldn't post in more than one forum? :)