Results 1 to 6 of 6

Thread: Setting Desktop Image (without access?)

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    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?

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    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...

  3. #3
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    The api call is SystemParametersInfo

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    ya.. just found it.. here is the API guides example

    VB Code:
    1. 'This project needs
    2. '- a common dialog box
    3. '  (To add the Common Dialog Box to your tools menu, go to Project->Components (or press CTRL-T)
    4. '   and select Microsoft Common Dialog control)
    5. '- a button
    6. 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
    7. Const SPI_SETDESKWALLPAPER = 20
    8. Const SPIF_UPDATEINIFILE = &H1
    9. Private Sub Command1_Click()
    10.     'KPD-Team 1998
    11.     'URL: [url]http://www.allapi.net/[/url]
    12.     'E-Mail: [email][email protected][/email]
    13.     'Set the commondialogbox' title
    14.     CDBox.DialogTitle = "Choose a bitmap"
    15.     'Set the filter
    16.     CDBox.Filter = "Windows Bitmaps (*.BMP)|*.bmp|All Files (*.*)|*.*"
    17.     'Show the 'Open File'-dialog
    18.     CDBox.ShowOpen
    19.     'Change the desktop's background
    20.     SystemParametersInfo SPI_SETDESKWALLPAPER, 0, CDBox.filename, SPIF_UPDATEINIFILE
    21. End Sub
    22. Private Sub Form_Load()
    23.     Command1.Caption = "Set Wallpaper"
    24. End Sub

  5. #5

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    This API would work even on a machine that has the control panel disabled?

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    ya it should...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width