想請問如何將我的Form鎖在畫面最前端? |
尚未結案
|
asure
一般會員 發表:4 回覆:2 積分:1 註冊:2005-12-06 發送簡訊給我 |
|
pcplayer99
尊榮會員 發表:146 回覆:790 積分:632 註冊:2003-01-21 發送簡訊給我 |
Always on top
If you put the code below in the OnShow event of the form and open the form with ShowModal, it should stay on top for you. Hope that helps, Greg // on the desired form . . . procedure TForm1.FormShow(Sender: TObject); begin SetWindowPos(Form1.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW); end; // on the calling form . . . procedure TfrmMain.Button1Click(Sender: TObject); begin Application.CreateForm(TForm1, Form1); Form1.ShowModal; Form1.Release; end; |
asure
一般會員 發表:4 回覆:2 積分:1 註冊:2005-12-06 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |