Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to minimize and restore all open applications Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
30-Aug-02
Category
Win API
Language
Delphi 2.x
Views
138
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas 

How to minimize and restore all open applications

Answer:

1   procedure MinimizeAll;
2   begin
3     { [Window key] + 'M' minimizes all windows, [Win][Shift] + 'M' restores them }
4     keybd_event(VK_LWIN, MapvirtualKey(VK_LWIN, 0), 0, 0);
5     keybd_event(Ord('M'), MapvirtualKey(Ord('M'), 0), 0, 0);
6     keybd_event(Ord('M'), MapvirtualKey(Ord('M'), 0), KEYEVENTF_KEYUP, 0);
7     keybd_event(VK_LWIN, MapvirtualKey(VK_LWIN, 0), KEYEVENTF_KEYUP, 0);
8   end;
9   
10  procedure UnMinimizeAll;
11  begin
12    { [Window key] + 'M' minimizes all windows, [Win][Shift] + 'M' restores them }
13    keybd_event(VK_LWIN, MapvirtualKey(VK_LWIN, 0), 0, 0);
14    keybd_event(VK_SHIFT, MapvirtualKey(VK_SHIFT, 0), 0, 0);
15    keybd_event(Ord('M'), MapvirtualKey(Ord('M'), 0), 0, 0);
16    keybd_event(Ord('M'), MapvirtualKey(Ord('M'), 0), KEYEVENTF_KEYUP, 0);
17    keybd_event(VK_SHIFT, MapvirtualKey(VK_SHIFT, 0), KEYEVENTF_KEYUP, 0);
18    keybd_event(VK_LWIN, MapvirtualKey(VK_LWIN, 0), KEYEVENTF_KEYUP, 0);
19  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC