N newsailor Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-15 #1 一個模態窗體,我希望當我按下ESC鍵時,將其關閉,在哪里寫代碼,怎樣寫呢?請賜教.
Y ysai Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-15 #2 procedure TOptionForm.FormKeyPress(Sender: TObject; var Key: Char); begin if key=#27 then begin key:=#0; Close; end; end;
procedure TOptionForm.FormKeyPress(Sender: TObject; var Key: Char); begin if key=#27 then begin key:=#0; Close; end; end;