Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Desktop background

Desktop background

Scheduled Pinned Locked Moved Visual Basic
question
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    The real M
    wrote on last edited by
    #1

    How can I set an image file as the user's desktop background image? Thanks :doh:

    T S C 3 Replies Last reply
    0
    • T The real M

      How can I set an image file as the user's desktop background image? Thanks :doh:

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      http://www.desktoppictures.com/saving-and-displaying.html[^]

      1 Reply Last reply
      0
      • T The real M

        How can I set an image file as the user's desktop background image? Thanks :doh:

        S Offline
        S Offline
        Sk93
        wrote on last edited by
        #3

        really good blog article on how to do this here: http://blogs.msdn.com/coding4fun/archive/2006/10/31/912569.aspx[^] Cheers, Sk93

        1 Reply Last reply
        0
        • T The real M

          How can I set an image file as the user's desktop background image? Thanks :doh:

          C Offline
          C Offline
          chilinhhacker
          wrote on last edited by
          #4

          I'm not good at English. Look at this registry key HKEY_CURRENT_USER\Control Panel\Desktop You can find a lot of values in this key. The value named "WallPaper" contains path of the desktop background image. Some of other values describe how should the image be displayed. Use My.Computer.Registry.SetValue(keyname as String, valueName as String, value as Object) to change the registry. This is an example code

          Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
          My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Desktop", "WallPaper", "D:\1.jpg")
          End Sub

          When you click the Button1, it changes your desktop background image path to "D:\1.jpg" Good luck!

          chilinhhacker

          T 1 Reply Last reply
          0
          • C chilinhhacker

            I'm not good at English. Look at this registry key HKEY_CURRENT_USER\Control Panel\Desktop You can find a lot of values in this key. The value named "WallPaper" contains path of the desktop background image. Some of other values describe how should the image be displayed. Use My.Computer.Registry.SetValue(keyname as String, valueName as String, value as Object) to change the registry. This is an example code

            Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Desktop", "WallPaper", "D:\1.jpg")
            End Sub

            When you click the Button1, it changes your desktop background image path to "D:\1.jpg" Good luck!

            chilinhhacker

            T Offline
            T Offline
            The real M
            wrote on last edited by
            #5

            Thanks ;) ;) ;)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups