|
-
Oct 10th, 2002, 02:36 PM
#1
Thread Starter
Frenzied Member
Setting Desktop Image (without access?)
Hi,
At my college, they have turned off the control panel so that nobody can change anything, including the desktop image.
But, people somehow find a way to set the desktop picture somehow, because every so often a new desktop image appears on some computers. If I were to write a VB program that could set the desktop image, would windows let it happen?
If not, how the heck are these people setting the desktop? Does anyone have any ideas?
-
Oct 10th, 2002, 02:39 PM
#2
yeah it is an API call.. for the life of me i can't remember what one... damn my friend brain!!!
it is also in the registry as well...
-
Oct 10th, 2002, 02:41 PM
#3
PowerPoster
The api call is SystemParametersInfo
-
Oct 10th, 2002, 02:41 PM
#4
ya.. just found it.. here is the API guides example
VB Code:
'This project needs
'- a common dialog box
' (To add the Common Dialog Box to your tools menu, go to Project->Components (or press CTRL-T)
' and select Microsoft Common Dialog control)
'- a button
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Const SPI_SETDESKWALLPAPER = 20
Const SPIF_UPDATEINIFILE = &H1
Private Sub Command1_Click()
'KPD-Team 1998
'URL: [url]http://www.allapi.net/[/url]
'Set the commondialogbox' title
CDBox.DialogTitle = "Choose a bitmap"
'Set the filter
CDBox.Filter = "Windows Bitmaps (*.BMP)|*.bmp|All Files (*.*)|*.*"
'Show the 'Open File'-dialog
CDBox.ShowOpen
'Change the desktop's background
SystemParametersInfo SPI_SETDESKWALLPAPER, 0, CDBox.filename, SPIF_UPDATEINIFILE
End Sub
Private Sub Form_Load()
Command1.Caption = "Set Wallpaper"
End Sub
-
Oct 10th, 2002, 02:53 PM
#5
Thread Starter
Frenzied Member
This API would work even on a machine that has the control panel disabled?
-
Oct 10th, 2002, 02:59 PM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|