B
BrammekeDotNet
Hi,
I'm trying to programatically (VB .NET 2003) change the wallpaper on my
Windows XP machine. I can see the desktop refreshing, but the wallpaper
itself never changes. I also can't make it blank by sending a
null-string (not illustrated here).
This is the code I wrote:
---
Declare Function SystemParametersInfo Lib "user32.dll" Alias
"SystemParametersInfoA" (ByVal uiAction As Long, ByVal uiParam As Long,
ByVal pvParam As Object, ByVal fWinIni As Long) As Boolean
---
Const SPI_SETDESKWALLPAPER = &H14
Const SPI_SETDESKPATTERN = &H15
Const SPIF_UPDATEINIFILE = &H1
Const SPIF_SENDWININICHANGE = &H2
Const SPIF_SENDCHANGE = SPIF_SENDWININICHANGE
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, filename,
SPIF_UPDATEINIFILE Or SPIF_SENDCHANGE)
---
Could someone give me a clue here? :/
Thanks!
Bram
I'm trying to programatically (VB .NET 2003) change the wallpaper on my
Windows XP machine. I can see the desktop refreshing, but the wallpaper
itself never changes. I also can't make it blank by sending a
null-string (not illustrated here).
This is the code I wrote:
---
Declare Function SystemParametersInfo Lib "user32.dll" Alias
"SystemParametersInfoA" (ByVal uiAction As Long, ByVal uiParam As Long,
ByVal pvParam As Object, ByVal fWinIni As Long) As Boolean
---
Const SPI_SETDESKWALLPAPER = &H14
Const SPI_SETDESKPATTERN = &H15
Const SPIF_UPDATEINIFILE = &H1
Const SPIF_SENDWININICHANGE = &H2
Const SPIF_SENDCHANGE = SPIF_SENDWININICHANGE
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, filename,
SPIF_UPDATEINIFILE Or SPIF_SENDCHANGE)
---
Could someone give me a clue here? :/
Thanks!
Bram