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