Gruppe
API
Problem
Das Windows-Desktop-Hintergrundbild soll festgelegt werden. Anzugeben ist der komplette Pfad- und Dateiname der *.bmp-Datei.
StandardModule: Modul1
Public 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
Sub ChangeWallpaper()
Dim lng As Long
Dim strWP As String
strWP = InputBox("Pfad der Hintergrunddatei:")
If strWP = "" Then Exit Sub
lng = SystemParametersInfo(20, 0, strWP, 1)
If lng = 0 Then
MsgBox "Hintergrunddatei konnte nicht gesetzt werden!"
End If
End Sub