KeyDown 問題 |
答題得分者是:hagar
|
carter6
初階會員 發表:53 回覆:108 積分:42 註冊:2002-12-16 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
參考:
How to catch a 'Tab Character' key stroke inside
your TEdit control. - by Borland Developer Support Staff
Abstract:
Question: How can I catch the tab character inside of my
Edit controls?
Answer: This can easily be done by overriding the forms
CMDialogKey procedure. To see how this works drop a Edit
on the form and enter in the following code:
procedure TMyForm.CMDialogKey(Var Msg: TWMKEY); begin if (ActiveControl = Edit1) and (Msg.Charcode = VK_TAB) then begin ShowMessage('Somebody Tabbed?'); end; inherited; end;Also, make sure to add the following line to your forms definition: procedure CMDialogKey(Var Msg: TWMKey); message CM_DIALOGKEY;-- Everything I say is a lie. |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |