[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 :)
Re: [2008] Change Wallpaper?
try this. the new wallpaper has to be in .bmp format
vb Code:
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
Const SPI_SETDESKWALLPAPER as integer = 20
Const SPIF_UPDATEINIFILE as integer = &H1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
Dim img As New Bitmap(OpenFileDialog1.FileName)
img.Save("c:\new.bmp", System.Drawing.Imaging.ImageFormat.Bmp)
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "c:\new.bmp", SPIF_UPDATEINIFILE)
End If
End Sub
Re: [2008] Change Wallpaper?
Thanks dude, the BMP thing isn't a problem i can make a built in image converter
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...
Re: [RESOLVED] Change Wallpaper?
Ryan2406 is this going to be Freeware? Because this program sounds intresting.
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.
Re: [RESOLVED] Change Wallpaper?
Of course it's freeware :)
Re: [RESOLVED] Change Wallpaper?
Great! Do you have a website where we'll be able to find this app once it's finished?
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 :thumb:
Re: [RESOLVED] Change Wallpaper?
Great, thank you. :thumb: