我
我爱delphi
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Timer1Timer(Sender: TObject);
var
; TheWindow: HWND; ; ; ; ; ; ; ; ; ;// this will hold the active window handle
; WindowText: array[0..255] of char; // this will hold the text of that window
begin
; TheWindow:=GetActiveWindow;
; GetWindowText(TheWindow,WindowText,255);
; Label1.Caption:='Active Window Text: '+string(WindowText);
end;
这段代码为何只能获取拥有这段代码的窗体的标题呢?
var
; TheWindow: HWND; ; ; ; ; ; ; ; ; ;// this will hold the active window handle
; WindowText: array[0..255] of char; // this will hold the text of that window
begin
; TheWindow:=GetActiveWindow;
; GetWindowText(TheWindow,WindowText,255);
; Label1.Caption:='Active Window Text: '+string(WindowText);
end;
这段代码为何只能获取拥有这段代码的窗体的标题呢?