|
-
Nov 18th, 2008, 01:16 AM
#1
Thread Starter
Fanatic Member
minimize all windows
Hey all.
a couple of my users are using a remote control program and cant use shortcuts like windows key + M to minimize all the open windows.
I wanted to try to do this programicly ( i have a existing program that i can assigne hot keys to ( ctrl+shfit+M) or something like that)
does anyone have decent way to minimize all the windows?
-
Nov 23rd, 2008, 01:31 PM
#2
PowerPoster
-
Nov 23rd, 2008, 05:27 PM
#3
Frenzied Member
Re: minimize all windows
 Originally Posted by Techno
***?
Anyways your best bet is going through every window and sending the minimize message. If you need an example let me know.
-
Nov 24th, 2008, 01:15 AM
#4
PowerPoster
Re: minimize all windows
no.... not really. best bet is to use SendKeys as it would save alot of time. Send the WindowsKey and the D key together. simple as.
-
Nov 24th, 2008, 01:28 AM
#5
Re: minimize all windows
Given that SendKeys.Send provides no modifier for the Windows key, it's not that easy after all. I think you'd have to use the SendInput API as there is a VK value for the Windows key.
-
Nov 24th, 2008, 01:56 AM
#6
PowerPoster
Re: minimize all windows
why not get the Windows key string and pass it? im sure I did this a long time ago for someone else....
Last edited by Techno; Nov 24th, 2008 at 01:59 AM.
-
Nov 24th, 2008, 02:00 AM
#7
Re: minimize all windows
 Originally Posted by Techno
why not get the Windows key string and pass it?
There is no string for the Windows key, or at least the documentation certainly doesn't indicate that there is. The documentation for SendKeys.Send specifies the string representations of various special keys and the Ctrl, Shift and Alt modifiers. No mention of the Windows key.
-
Nov 24th, 2008, 02:06 AM
#8
Re: minimize all windows
you could shell the quicklaunch icon that does this, if it's a given that the icon will be there. You could even distribute the program with a copy of the shortcut in your program's folder and you will know it's there.
the shortcut is actually made up of a text file named showdesktop.scf and containing only this text:
Code:
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]Command=ToggleDesktop
-
Nov 25th, 2008, 01:13 PM
#9
Thread Starter
Fanatic Member
Re: minimize all windows
how would i translate that into code?
-
Nov 25th, 2008, 07:38 PM
#10
Re: minimize all windows
shell("showdesktop.scf") or something similar
-
Nov 26th, 2008, 01:28 AM
#11
PowerPoster
Re: minimize all windows
no thats incorrect.
you would need to use the Process.Start approach, or use the ProcessStartInfo classs to further customize the operation. Both of which are located in the System.Diagnostics namespace. Example:
System.Diagnostics.Process.Start("MyFile.ext");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|