H
HanneSThEGreaT
Guest
Hello. I am trying to change the wallpaper of my Windows 8 machine via the use of the SystemParamersInfo API.
I do this :
Public Shared Function SystemParametersInfo( _ ByVal intAction As Integer, _
ByVal intParam As Integer, _
ByVal strParam As String, _
ByVal intWinIniFlag As Integer) As Integer
returns non-zero value if function succeeds
End Function
Const SPIF_UPDATEINIFILE = &H1
Const SPI_SETDESKWALLPAPER = 20
Const SPIF_SENDWININICHANGE = &H2
Private Sub btnSet_Click(sender As Object, e As RoutedEventArgs) Handles btnSet.Click
Dim strPicFileName As String = arrFileNames(lstFiles.SelectedIndex)
Dim x As Integer x = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0&, strPicFileName, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub
But it doesnt change my wallpaper. strPicFileName is perfect. I just want to change my wallpaper on WIndows 8.
Any help, please?
Continue reading...
I do this :
Public Shared Function SystemParametersInfo( _ ByVal intAction As Integer, _
ByVal intParam As Integer, _
ByVal strParam As String, _
ByVal intWinIniFlag As Integer) As Integer
returns non-zero value if function succeeds
End Function
Const SPIF_UPDATEINIFILE = &H1
Const SPI_SETDESKWALLPAPER = 20
Const SPIF_SENDWININICHANGE = &H2
Private Sub btnSet_Click(sender As Object, e As RoutedEventArgs) Handles btnSet.Click
Dim strPicFileName As String = arrFileNames(lstFiles.SelectedIndex)
Dim x As Integer x = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0&, strPicFileName, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub
But it doesnt change my wallpaper. strPicFileName is perfect. I just want to change my wallpaper on WIndows 8.
Any help, please?
Continue reading...