Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: Invoke C dll functions and structs in C# Pin
Keith Barrow26-Oct-09 0:43
professionalKeith Barrow26-Oct-09 0:43 
QuestionDifference between Monitor.TryEnter(object,Timespan) and Monitor.Wait(object,Timespan) Pin
frommi26-Oct-09 0:12
frommi26-Oct-09 0:12 
AnswerRe: Difference between Monitor.TryEnter(object,Timespan) and Monitor.Wait(object,Timespan) Pin
Simon P Stevens26-Oct-09 0:43
Simon P Stevens26-Oct-09 0:43 
AnswerProblem with System.Diagnostics.Process.Start [modified] Pin
Slavakr26-Oct-09 0:10
Slavakr26-Oct-09 0:10 
AnswerRe: Problem with System.Diagnostics.Process.Start Pin
Simon P Stevens26-Oct-09 0:15
Simon P Stevens26-Oct-09 0:15 
GeneralRe: Problem with System.Diagnostics.Process.Start Pin
Slavakr26-Oct-09 0:31
Slavakr26-Oct-09 0:31 
GeneralRe: Problem with System.Diagnostics.Process.Start Pin
Simon P Stevens26-Oct-09 1:03
Simon P Stevens26-Oct-09 1:03 
QuestionShow Windows Desktop, nothing else... Pin
Naruki25-Oct-09 23:39
Naruki25-Oct-09 23:39 
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 bits are requested, and of course when I get it working I'll share the whole finished steaming pile of code.

よろしくおねがいします。

Narf.

AnswerRe: Show Windows Desktop, nothing else... Pin
Simon P Stevens26-Oct-09 0:11
Simon P Stevens26-Oct-09 0:11 
GeneralRe: Show Windows Desktop, nothing else... Pin
Naruki26-Oct-09 4:08
Naruki26-Oct-09 4:08 
AnswerRe: Show Windows Desktop, nothing else... Pin
Shorgov26-Oct-09 0:16
Shorgov26-Oct-09 0:16 
GeneralRe: Show Windows Desktop, nothing else... Pin
Naruki26-Oct-09 4:20
Naruki26-Oct-09 4:20 
QuestionHow to get contents of cache memory in c#? Pin
Swapnil 200925-Oct-09 23:24
Swapnil 200925-Oct-09 23:24 
AnswerRe: How to get contents of cache memory in c#? Pin
Abhishek Sur25-Oct-09 23:32
professionalAbhishek Sur25-Oct-09 23:32 
GeneralRe: How to get contents of cache memory in c#? Pin
Swapnil 200925-Oct-09 23:42
Swapnil 200925-Oct-09 23:42 
AnswerRe: How to get contents of cache memory in c#? Pin
Jaiprakash M Bankolli25-Oct-09 23:43
Jaiprakash M Bankolli25-Oct-09 23:43 
GeneralRe: How to get contents of cache memory in c#? Pin
Swapnil 200926-Oct-09 0:04
Swapnil 200926-Oct-09 0:04 
Questionproblem with custom control properties value Pin
Lyon Sun25-Oct-09 23:18
Lyon Sun25-Oct-09 23:18 
AnswerMessage Closed Pin
25-Oct-09 23:35
stancrm25-Oct-09 23:35 
GeneralRe: problem with custom control properties value Pin
Lyon Sun25-Oct-09 23:45
Lyon Sun25-Oct-09 23:45 
GeneralRe: problem with custom control properties value Pin
Lyon Sun26-Oct-09 0:01
Lyon Sun26-Oct-09 0:01 
AnswerRe: problem with custom control properties value Pin
Abhishek Sur25-Oct-09 23:42
professionalAbhishek Sur25-Oct-09 23:42 
GeneralRe: problem with custom control properties value Pin
Lyon Sun25-Oct-09 23:59
Lyon Sun25-Oct-09 23:59 
QuestionHow to get contents of cache memory in c#? Pin
snakeway42025-Oct-09 23:17
snakeway42025-Oct-09 23:17 
AnswerRe: How to get contents of cache memory in c#? Pin
Abhishek Sur25-Oct-09 23:34
professionalAbhishek Sur25-Oct-09 23:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.