A
Acer Lam
In VB 6.0 I was able to use API calls to change the
Windows Wallpaper. But for some reason I can't get the
API call to work in VB .Net at all. Anyone know of a way
to change the wallpaper programmatically from VB .Net?
It doesn't have to be an API call, so long as it works.
Here's the code I've tried:
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
Const SPI_SETDESKWALLPAPER = 20
Const SPIF_UPDATEINIFILE = &H1
Const SPIF_SENDWININICHANGE = &H2
....
Dim FileName As String
Dim X As Long
FileName = "d:\wallpaper.bmp"
X = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0&,
FileName, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
Any help would be greatly appreciated. Thanks in advance.
Acer Lam
(e-mail address removed)
Windows Wallpaper. But for some reason I can't get the
API call to work in VB .Net at all. Anyone know of a way
to change the wallpaper programmatically from VB .Net?
It doesn't have to be an API call, so long as it works.
Here's the code I've tried:
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
Const SPI_SETDESKWALLPAPER = 20
Const SPIF_UPDATEINIFILE = &H1
Const SPIF_SENDWININICHANGE = &H2
....
Dim FileName As String
Dim X As Long
FileName = "d:\wallpaper.bmp"
X = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0&,
FileName, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
Any help would be greatly appreciated. Thanks in advance.
Acer Lam
(e-mail address removed)