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. C#
  4. How to set a desktop wallpaper

How to set a desktop wallpaper

Scheduled Pinned Locked Moved C#
csharphelptutorialquestion
5 Posts 3 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.
  • A Offline
    A Offline
    Albu Marius
    wrote on last edited by
    #1

    Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:

    M A G 3 Replies Last reply
    0
    • A Albu Marius

      Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:

      M Offline
      M Offline
      Martin 0
      wrote on last edited by
      #2

      Hello, Ed.Poore's answere some time ago![^] All the best, Martin

      1 Reply Last reply
      0
      • A Albu Marius

        Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:

        A Offline
        A Offline
        Albu Marius
        wrote on last edited by
        #3

        Thanks for your reply Martin but I forgot to mention that I have already used that code. At first it works just fine but after a shutdown or restart the wallpaper disappears from desktop but if I go to Properties/Desktop it appears to be there. This is some voodoo thing. :confused:

        1 Reply Last reply
        0
        • A Albu Marius

          Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Did you have a look at this: csharp wallpaperchanger.asp[^]

          #region signature my articles #endregion

          A 1 Reply Last reply
          0
          • G Giorgi Dalakishvili

            Did you have a look at this: csharp wallpaperchanger.asp[^]

            #region signature my articles #endregion

            A Offline
            A Offline
            Albu Marius
            wrote on last edited by
            #5

            Thanks Giorgi. It works. But the thing that intrigues me is why this code works and the other doesn't. The parts that deal with the actual operation are identical. Probably I am missing something in the part that handles the registry.:):~

            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