Results 1 to 2 of 2

Thread: Changing Windows Background

  1. #1

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181

    Changing Windows Background

    I have some code that I incorporated into a program that changes the Windows background (wallpaper). It works fine under Windows 98, but it will not work under Windows 2000. Does anyone know of any code that will work for all varieties of Windows?

    Thanks!

    Code:
    If SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, FileDirectory & "background_eagle_1024.bmp", 0) Then
        MsgBox "Wallpaper changed!"
    Else
        MsgBox "An Error Occurred!"
    End If

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Try using this
    Code:
    If SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, FileDirectory & "background_eagle_1024.bmp", &H1) Then
        MsgBox "Wallpaper changed!"
    Else
        MsgBox "An Error Occurred!"
    End If

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