hi
how to change desktop back using jpg
i got vb code to change it but Accept just bmp
this is the code
and i want it to change the background and Accept the both type of imageCode:Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As String, ByVal fuWinIni As Long) As Long Private Const SPI_SETDESKWALLPAPER = 20 Private Const SPIF_UPDATEINIFILE = &H1 Private imagePath As String Private Sub cmdBrowse_Click() 'set a custom title to the dialog dlg.DialogTitle = "Select the image to load." 'show the dialog dlg.ShowOpen 'the path to get the image from imagePath = dlg.FileName 'view the selected picture into the picturebox 'control pic.Picture = LoadPicture(imagePath) End Sub Private Sub cmdSetWallPaper_Click() SystemParametersInfo SPI_SETDESKWALLPAPER, 0, imagePath, SPIF_UPDATEINIFILE End Sub
BMP & JPG
![]()




Reply With Quote