先通过如下的过程取得相关对象的HANDLEvar
hCurrentWindow: HWnd;
szText: array[0..254] of char;
i:integer;
begin
i:=0;
memo1.Lines.clear;
Memo1.Lines.Add('序号'+chr(9)+'句柄'+chr(9)+'程序');
while i<9000 do
begin
hCurrentWindow:=GetWindow(i, GW_HWNDNEXT);
if GetWindowText(hcurrentwindow, @szText, 255)>0 then
Memo1.Lines.Add(inttostr(Memo1.Lines.Count)+chr(9)+inttostr(i)+chr(9)+StrPas(@szText));
inc(i);
end;然后通过 postmessage 函数发系统消息,即可。
hCurrentWindow: HWnd;
szText: array[0..254] of char;
i:integer;
begin
i:=0;
memo1.Lines.clear;
Memo1.Lines.Add('序号'+chr(9)+'句柄'+chr(9)+'程序');
while i<9000 do
begin
hCurrentWindow:=GetWindow(i, GW_HWNDNEXT);
if GetWindowText(hcurrentwindow, @szText, 255)>0 then
Memo1.Lines.Add(inttostr(Memo1.Lines.Count)+chr(9)+inttostr(i)+chr(9)+StrPas(@szText));
inc(i);
end;然后通过 postmessage 函数发系统消息,即可。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货