最小化所有窗口

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
keybd_event(91, MapVirtualKey( 91, 0 ), 0 , 0 ); // win 键按下 keybd_event(77, MapVirtualKey( 77, 0 ), 0 , 0 ); // M 键按下
keybd_event(77, MapVirtualKey( 77, 0 ), KEYEVENTF_KEYUP , 0 ); // M 键抬起
keybd_event(91, MapVirtualKey( 91, 0 ), KEYEVENTF_KEYUP , 0 ); // win 键抬起
**************************
procedure TForm1.Button1Click(Sender: TObject);
var
h: HWnd;
begin
h := Handle;
while h > 0 do
begin
if IsWindowVisible(h) then
PostMessage(h, WM_SYSCOMMAND, SC_MINIMIZE, 0);
h := GetNextWindow(h, GW_HWNDNEXT);
end;
end;
// Or Simulate Win + M:
procedure TForm1.Button1Click(Sender: TObject);
begin
Keybd_event(VK_LWIN, 0, 0, 0);
Keybd_event(Byte('M'), 0, 0, 0);
Keybd_event(Byte('M'), 0, KEYEVENTF_KEYUP, 0);
Keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0);
end;
 

Similar threads

I
回复
0
查看
540
import
I
I
回复
0
查看
769
import
I
I
回复
0
查看
574
import
I
后退
顶部