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. Show Windows Desktop, nothing else...

Show Windows Desktop, nothing else...

Scheduled Pinned Locked Moved C#
helpcsharpjavacomtutorial
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.
  • N Offline
    N Offline
    Naruki 0
    wrote on last edited by
    #1

    C# newbie here. I am using the wonderful John’s Background Switcher[^] to keep my wallpaper fresh and interesting, and I realized I'd like to make use of it for my screen saver, too. Since he does not have an option for that, I thought I'd try learning how to make a little C# screensaver form that just showed the wallpaper as is. That was about a week ago. In my experiments, I decided there are two general ways of solving this problem: 1) create a blank desktop and display it with no apps running (or my own app, which wouldn't do anything but listen for a keypress) 2) hide everything on the existing desktop, leaving only the wallpaper visible I have found code samples for creating desktops, but nothing that I can figure out how to make work with my tiny brain. So I concentrated on option 2. This requires 3 steps: a) hide all shortcut icons b) hide all running taskbar icons [& the taskbar] c) make wallpaper visible through my app's form C seemed pretty easy from my Java perspective: just throw up a glasspane and be done. C# begs to differ with me. I did finally find a way to keep my app transparent enough without allowing click-thru (mouse clicks activating the visible icons behind my transparent form), or so I think. Regardless, it won't matter if I hide everything that shouldn't be shown. I have just now figured out how to reliably hide shortcut icons and redisplay them at will. This problem was a lot harder than it should have been because everybody seems to say "icons" when they mean the stuff on the taskbar (naturally, I assumed they'd use the term tasks or some such - silly me). But now it's good. So now I am stuck on step B - hide everything else. I did find a PInvoke for toggling the desktop, but it has some nasty drawbacks: - it requires including a DLL with the screen saver executable - it does not let me know if things are visible or not - the restore does not put things back the way they should be I really think the first option is best (create an empty desktop), but I don't know how to make that work. If anyone has the right solution... Barring that, does anyone know how to "properly" hide all desktop icons, and then how to restore them as they were? No code shown because my stuff is a horrible mess and would only make this post even more confusing. But I'll post whatever b

    S S 2 Replies Last reply
    0
    • N Naruki 0

      C# newbie here. I am using the wonderful John’s Background Switcher[^] to keep my wallpaper fresh and interesting, and I realized I'd like to make use of it for my screen saver, too. Since he does not have an option for that, I thought I'd try learning how to make a little C# screensaver form that just showed the wallpaper as is. That was about a week ago. In my experiments, I decided there are two general ways of solving this problem: 1) create a blank desktop and display it with no apps running (or my own app, which wouldn't do anything but listen for a keypress) 2) hide everything on the existing desktop, leaving only the wallpaper visible I have found code samples for creating desktops, but nothing that I can figure out how to make work with my tiny brain. So I concentrated on option 2. This requires 3 steps: a) hide all shortcut icons b) hide all running taskbar icons [& the taskbar] c) make wallpaper visible through my app's form C seemed pretty easy from my Java perspective: just throw up a glasspane and be done. C# begs to differ with me. I did finally find a way to keep my app transparent enough without allowing click-thru (mouse clicks activating the visible icons behind my transparent form), or so I think. Regardless, it won't matter if I hide everything that shouldn't be shown. I have just now figured out how to reliably hide shortcut icons and redisplay them at will. This problem was a lot harder than it should have been because everybody seems to say "icons" when they mean the stuff on the taskbar (naturally, I assumed they'd use the term tasks or some such - silly me). But now it's good. So now I am stuck on step B - hide everything else. I did find a PInvoke for toggling the desktop, but it has some nasty drawbacks: - it requires including a DLL with the screen saver executable - it does not let me know if things are visible or not - the restore does not put things back the way they should be I really think the first option is best (create an empty desktop), but I don't know how to make that work. If anyone has the right solution... Barring that, does anyone know how to "properly" hide all desktop icons, and then how to restore them as they were? No code shown because my stuff is a horrible mess and would only make this post even more confusing. But I'll post whatever b

      S Offline
      S Offline
      Simon P Stevens
      wrote on last edited by
      #2

      It seems like you are overcomplicating the problem. I don't understand why you don't just make your app full screen and display the required image over the top of everything else.

      Simon

      N 1 Reply Last reply
      0
      • N Naruki 0

        C# newbie here. I am using the wonderful John’s Background Switcher[^] to keep my wallpaper fresh and interesting, and I realized I'd like to make use of it for my screen saver, too. Since he does not have an option for that, I thought I'd try learning how to make a little C# screensaver form that just showed the wallpaper as is. That was about a week ago. In my experiments, I decided there are two general ways of solving this problem: 1) create a blank desktop and display it with no apps running (or my own app, which wouldn't do anything but listen for a keypress) 2) hide everything on the existing desktop, leaving only the wallpaper visible I have found code samples for creating desktops, but nothing that I can figure out how to make work with my tiny brain. So I concentrated on option 2. This requires 3 steps: a) hide all shortcut icons b) hide all running taskbar icons [& the taskbar] c) make wallpaper visible through my app's form C seemed pretty easy from my Java perspective: just throw up a glasspane and be done. C# begs to differ with me. I did finally find a way to keep my app transparent enough without allowing click-thru (mouse clicks activating the visible icons behind my transparent form), or so I think. Regardless, it won't matter if I hide everything that shouldn't be shown. I have just now figured out how to reliably hide shortcut icons and redisplay them at will. This problem was a lot harder than it should have been because everybody seems to say "icons" when they mean the stuff on the taskbar (naturally, I assumed they'd use the term tasks or some such - silly me). But now it's good. So now I am stuck on step B - hide everything else. I did find a PInvoke for toggling the desktop, but it has some nasty drawbacks: - it requires including a DLL with the screen saver executable - it does not let me know if things are visible or not - the restore does not put things back the way they should be I really think the first option is best (create an empty desktop), but I don't know how to make that work. If anyone has the right solution... Barring that, does anyone know how to "properly" hide all desktop icons, and then how to restore them as they were? No code shown because my stuff is a horrible mess and would only make this post even more confusing. But I'll post whatever b

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

        I think you are making your life miserable. Sacha Barber has a great article about the screen savers WPF : A 3D screensaver written in WPF[^] You can check and Jacob Jordan's article Making a C# screensaver[^]

        N 1 Reply Last reply
        0
        • S Simon P Stevens

          It seems like you are overcomplicating the problem. I don't understand why you don't just make your app full screen and display the required image over the top of everything else.

          Simon

          N Offline
          N Offline
          Naruki 0
          wrote on last edited by
          #4

          Well, obviously the big factor here is learning. I'm doing this because I want to know something about C# and Windows APIs and stuff. But more specifically to your point, because the "required image" changes from time to time. The wallpaper changer automatically pulls down random images from the net. In order to reproduce all of that functionality, I'd have to do something very complex indeed, and that's definitely beyond the scope of my little project. My app IS fullscreen, because it has to cover all the other apps and prevent them from receiving keystrokes/mouse movements. I had to make it transparent so I could see the stuff below, but do that without letting the mouse clicks or keystroke slip through. In Java, that means a glasspane. In C#, it means a headache. At least so far as I know. Total newb here.

          Narf.

          1 Reply Last reply
          0
          • S Shorgov

            I think you are making your life miserable. Sacha Barber has a great article about the screen savers WPF : A 3D screensaver written in WPF[^] You can check and Jacob Jordan's article Making a C# screensaver[^]

            N Offline
            N Offline
            Naruki 0
            wrote on last edited by
            #5

            No, it's Windows that is making my life miserable. I am just trying to learn how to make use of the APIs to do something that, conceptually at least, is very straightforward. The second link is one I already used. I think it was the third one I found for making C# screen savers. Also, Visual Studio 2005 comes with a screen saver learning kit, and I used that one, too. I know the basics already. But my only problem now is I want to view the wallpaper - and nothing else - beneath my transparent pane, while still preventing any keystrokes etcetera from getting through. Technically my problem is not knowing how to do that, but that's why I'm asking for help. The first link is also interesting, and I may want to look at it later, but it's for a different kind of project than what I am trying to do here. Thanks anyway.

            Narf.

            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