FindWindow |
尚未結案
|
simon87
一般會員 發表:10 回覆:2 積分:2 註冊:2005-06-19 發送簡訊給我 |
|
supman
尊榮會員 發表:29 回覆:770 積分:924 註冊:2002-04-22 發送簡訊給我 |
您好:
請勿跨區Post....
新手請參考下面站台規定。
http://delphi.ktop.com.tw/ktop12.htm 您的問題在
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=73522
回覆如下: 程式參考如下,發問前請先搜尋站內資料,找"FindWindows"相信有一卡車資料。
procedure TForm1.Button1Click(Sender: TObject);
var
hw:HWND;
begin
hw:=FindWindow(nil,'未命名 - 記事本');//找到記事本的handle
SetForegroundWindow(hw); //設定焦點
end;
|
simon87
一般會員 發表:10 回覆:2 積分:2 註冊:2005-06-19 發送簡訊給我 |
|
supman
尊榮會員 發表:29 回覆:770 積分:924 註冊:2002-04-22 發送簡訊給我 |
連放都不會放?
去看看書吧....
unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var hw:HWND; begin hw:=FindWindow(nil,'未命名 - 記事本');//找到記事本的handle SetForegroundWindow(hw); //設定焦點 end; end. |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |