Results 1 to 5 of 5

Thread: [RESOLVED] How To Change Desktop Background Using jpg Image

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Location
    IRaQ / BaghDaD
    Posts
    192

    Resolved [RESOLVED] How To Change Desktop Background Using jpg Image

    hi

    how to change desktop back using jpg

    i got vb code to change it but Accept just bmp

    this is the code


    Code:
    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
    and i want it to change the background and Accept the both type of image

    BMP & JPG

    Last edited by DeadlyMan; Dec 15th, 2009 at 12:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width