会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
rayhuang
博客园
首页
新随笔
联系
订阅
管理
2010年4月10日
delphi中如何响应键盘的组合键(如:ctrl k)
摘要: 1:varHot: boolean;procecure form1.formkeydown(.....);beginif (key = VK_K) and (ssShift in shift) thenif hot thenbegin//处理ctrl kkhot := false;endelse hot := trueelsehot := false;end; 2:可以设置快捷键,也可以在程序中设...
阅读全文
posted @ 2010-04-10 22:06 rayhuang
阅读(1939)
评论(0)
推荐(0)
编辑
1. 在delphi根据TshiftState值来判断用户按下Ctrl,shift,alt等键的方法
摘要: procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);beginif ssCtrl in shift then ShowMessage('ssCtrl');shift 是一个集合变量。type TShiftState = set of (ssS...
阅读全文
posted @ 2010-04-10 22:03 rayhuang
阅读(992)
评论(0)
推荐(0)
编辑
公告