線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1591
推到 Plurk!
推到 Facebook!

如何清除KeyBoard 的Buffer

答題得分者是:jackkcg
0316
一般會員


發表:32
回覆:19
積分:10
註冊:2002-07-03

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-01-22 14:59:36 IP:61.220.xxx.xxx 未訂閱
請問如何清除KeyBoard 的Buffer, 謝謝! 泓遠
------
泓遠
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-01-22 20:32:58 IP:202.39.xxx.xxx 未訂閱
蠻奇怪的問題, 什麼叫做清除 Keyboard 的 Buffer 呢? 可否舉個例? -- 將進酒 杯莫停 與君歌一曲 請君為我傾耳聽
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-01-23 10:07:15 IP:147.8.xxx.xxx 未訂閱
I think Windows has nothing to do with the keyboard buffer unlike the DOS applications. Under Windows, all key strokes are converted into messages and perhaps you could try to remove the related messages from the message queue. Although it is easy to remove message from its own message queue, I don't think there is any easy way to modify the message queue of other applications.
0316
一般會員


發表:32
回覆:19
積分:10
註冊:2002-07-03

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-01-23 12:05:52 IP:61.220.xxx.xxx 未訂閱
keybd_event(13, 0, 0, 0); 模擬鍵盤輸入Enter鍵 相對是否也應該有清除鍵盤緩衝區的字元呢? 泓遠
------
泓遠
jackkcg
站務副站長


發表:891
回覆:1050
積分:848
註冊:2002-03-23

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-01-23 12:20:15 IP:61.221.xxx.xxx 未訂閱
如何清空鍵盤的緩衝區(Buffer)? 轉貼看看 http://delphi.ktop.com.tw/topic.php?topic_id=18231 領航天使 站長 如何清空鍵盤的緩衝區(Buffer)? 可用於進入某個輸入的TFrom前清空Keyboard Buffer,以免誤輸入錯誤的資料! procedure EmptyKeyQueue;var msg: TMsg;begin while PeekMessage(msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE or PM_NOYIELD) do;end; ********************************************************** 哈哈&兵燹 最會的2大絕招 這個不會與那個也不會 哈哈哈 粉好 Delphi K.Top的K.Top分兩個字解釋Top代表尖端的意思,希望本討論區能提供Delphi的尖端新知 K.表Knowlege 知識,就是本站的標語:Open our mind to make knowledge together! 希望能大家敞開心胸,將知識寶庫結合一起
------
**********************************************************
哈哈&兵燹
最會的2大絕招 這個不會與那個也不會 哈哈哈 粉好

Delphi K.Top的K.Top分兩個字解釋Top代表尖端的意思,希望本討論區能提供Delphi的尖端新知
K.表Knowlege 知識,就是本站的標語:Open our mind
系統時間:2024-05-20 16:01:58
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!