Results 1 to 10 of 10

Thread: [RESOLVED] Change Wallpaper?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    107

    [RESOLVED] Change Wallpaper?

    I have successfully made a program which will allow my users to have seperate desktops on 1 computer, but by this i mean file wise, I now wish to give my users the real effect of switching desktops by allowing them to switch wall paper and if possible even theme, is this possible in VB?
    P.s. If someone knew the Registry key to change the Place where shortcuts appeared instead of the default desktop that would be great
    Last edited by Ryan2406; Aug 19th, 2008 at 02:11 PM.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: [2008] Change Wallpaper?

    try this. the new wallpaper has to be in .bmp format

    vb Code:
    1. Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As integer , ByVal uParam As integer , ByVal lpvParam As String, ByVal fuWinIni As integer ) As integer
    2.  
    3. Const SPI_SETDESKWALLPAPER as integer = 20
    4. Const SPIF_UPDATEINIFILE as integer = &H1
    5.  
    6. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    7.     If OpenFileDialog1.ShowDialog = DialogResult.OK Then
    8.        Dim img As New Bitmap(OpenFileDialog1.FileName)
    9.        img.Save("c:\new.bmp", System.Drawing.Imaging.ImageFormat.Bmp)
    10.        SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "c:\new.bmp", SPIF_UPDATEINIFILE)
    11.     End If
    12. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    107

    Re: [2008] Change Wallpaper?

    Thanks dude, the BMP thing isn't a problem i can make a built in image converter

  4. #4
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: [RESOLVED] Change Wallpaper?

    Why would this not work

    Code:
    Dim fL As String = "F:\Photos\" & ListBox1.SelectedItem
    SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, fL, SPIF_UPDATEINIFILE)
    Instead of resaving the wallpaper just send the URL or the existing image? I just get a blank screen when I run this...

  5. #5
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: [RESOLVED] Change Wallpaper?

    Ryan2406 is this going to be Freeware? Because this program sounds intresting.

  6. #6
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [RESOLVED] Change Wallpaper?

    Quote Originally Posted by noahssite
    Ryan2406 is this going to be Freeware? Because this program sounds intresting.
    Yeah, my thoughts exactly. If it's freeware, I could even help with a bit of beta-testing.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    107

    Re: [RESOLVED] Change Wallpaper?

    Of course it's freeware

  8. #8
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [RESOLVED] Change Wallpaper?

    Great! Do you have a website where we'll be able to find this app once it's finished?
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    107

    Re: [RESOLVED] Change Wallpaper?

    Quote Originally Posted by obi1kenobi
    Great! Do you have a website where we'll be able to find this app once it's finished?
    Nah I don't have a website but i am planning on buying one as soon as i can get paypal to work although i will let you know when it's finished

  10. #10
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [RESOLVED] Change Wallpaper?

    Great, thank you.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

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