Results 1 to 2 of 2

Thread: A quick question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 1999
    Location
    Pembroke Dock, Pembrokeshire, Wales
    Posts
    10

    Question

    If I had a form with just a colour background and an image, can I display it as a desktop wallpaper?

  2. #2
    Guest
    To save an image:

    Code:
    SavePicture Picture1.Picture, "C:\mypic.bmp"
    To set it as the Desktop wallpaper:

    Code:
    Public Declare Function WritePrivateProfileString _
    Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal _
    lpApplicationName As String, ByVal lpKeyName As Any, ByVal _
    lpString As Any, ByVal lpFileName As String) As Long
    
    Public Sub WriteINI(strsection As String, strkey As String, strkeyvalue As String, strfullpath As String)
        Call WritePrivateProfileString(strsection$, UCase$(strkey$), strkeyvalue$, strfullpath$)
    End Sub
    
    Usage
    
    Call WriteINI("Desktop", "Wallpaper", "C:\mypic.bmp", "C:\Windows\Win.ini")

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