Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi DialogBox 的問題

0 views
Skip to first unread message

手舞足蹈

unread,
Sep 6, 1996, 3:00:00 AM9/6/96
to

各位好:

小弟在設計dialog box時發生了一點問題,程式如下:

procedure Ttestform.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var test:Tdlg1;
begin

if key=VK_Escape then
begin
test:=tdlg1.create(application);
test.showmodal;

if test.showmodal=mrok then--->當加上此判斷句時,Dialog box 上的OK buttom 或
mainview.close; Cancel Buttom 都必須按上兩次,dialog box 才會
end; 關閉回傳 test.showmodal:=mrok or mrcancel,請
問這是怎麼一回事?請各位先進幫小弟回答一下,小
end; 弟不勝感激,thanks.


--
※ 來源:台灣工技學院BBS(bbs.et.ntit.edu.tw) ◆來自: 140.118.202.203

Lovely Ghost

unread,
Sep 7, 1996, 3:00:00 AM9/7/96
to

手舞足蹈 wrote:
>
> if key=VK_Escape then
> begin
> test:=tdlg1.create(application);
> test.showmodal;
^^^^^^^^^^^^^^^^^^
把這一行去掉吧!


> if test.showmodal=mrok then--->當加上此判斷句時,Dialog box 上的OK buttom 或
> mainview.close; Cancel Buttom 都必須按上兩次,dialog box 才會
> end; 關閉回傳 test.showmodal:=mrok or mrcancel,請
> 問這是怎麼一回事?請各位先進幫小弟回答一下,小
> end; 弟不勝感激,thanks.
>

--

================================================================
== Life is a procedure, not an event. ==
================================================================

0 new messages