Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hOW TO CHANGE THE WALLPAPER?

Status
Not open for further replies.

rstevep8

Programmer
Dec 21, 2000
10
SV
I need help to change the wallpaper.

Someone can help me?

Thanx.

Steve Portillo
rstevep8@yahoo.com
 
Change Wallpaper

'Add a module to your project (In the menu choose Project -> Add Module, Then click Open)
'Add 1 Command Button to your form.
'Insert the following code to your module :

Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal _
fuWinIni As Long) As Long

'Insert the following code to your form:

Private Sub Command1_Click()
Dim t As Long
Dim Wallpaper As String
'Replace 'c:\MyFile.bmp' with the name of your BMP File.
Wallpaper = "c:\MyFile.bmp"
t = SystemParametersInfo(ByVal 20, vbnostring, ByVal Wallpaper, &H1)
If t = 0 Then
MsgBox "Error changing wallpaper"
Exit Sub
End If
End Sub

Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top