DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: jsuguo
今日帖子: 34
在线用户: 16
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 asdfzxcv66 (asdfzxcv) ★☆☆☆☆ -
普通会员
2019/10/14 9:06:50
标题:
Delphi xe10.3中   我想在timer中实现判断同时按下了鼠标右键和键盘中的f1(键码112)键,代码应该怎么写,谢谢! 浏览:937
加入我的收藏
楼主: Delphi xe10.3中   我想在timer中实现判断同时按下了鼠标右键和键盘中的f1(键码112)键,代码应该怎么写,谢谢!
----------------------------------------------
-
作者:
男 iamdream (银河恒久远,梦想无止境!) ★☆☆☆☆ -
大贡献会员
2019/10/14 10:41:17
1楼: procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Timer1.Enabled := False;
  if (GetKeyState(VK_RBUTTON) < 0) and (GetKeyState(VK_F1) < 0) then begin
    Caption := 'Right Mouse Click + F1';
  end else begin
    Caption := 'Nothing';
  end;
  Timer1.Enabled := True;
end;
----------------------------------------------
-广袤璀璨的银河,永无止境的梦想(梦无止境游银河) 博客挂了……
作者:
男 asdfzxcv66 (asdfzxcv) ★☆☆☆☆ -
普通会员
2019/10/14 13:28:42
2楼: iamdream 谢谢,我试一试
----------------------------------------------
-
作者:
男 asdfzxcv66 (asdfzxcv) ★☆☆☆☆ -
普通会员
2019/10/14 13:30:55
3楼: [dcc64 Error] Unit2.pas(86): E2003 Undeclared identifier: 'GetKeyState'
[dcc64 Error] Unit2.pas(86): E2003 Undeclared identifier: 'VK_RBUTTON'
[dcc64 Warning] Unit2.pas(86): W1023 Comparing signed and unsigned types - widened both operands
[dcc64 Error] Unit2.pas(86): E2003 Undeclared identifier: 'VK_F1'
[dcc64 Warning] Unit2.pas(86): W1023 Comparing signed and unsigned types - widened both operands
[dcc64 Fatal Error] Unit1.pas(31): F2063 Could not compile used unit 'Unit2.pas'
Failed
Elapsed time: 00:00:01.1
----------------------------------------------
-
作者:
男 asdfzxcv66 (asdfzxcv) ★☆☆☆☆ -
普通会员
2019/10/14 13:31:23
4楼: 出现这个提示,编译通不过
----------------------------------------------
-
作者:
男 asdfzxcv66 (asdfzxcv) ★☆☆☆☆ -
普通会员
2019/10/14 13:49:14
5楼: uses
 Windows, Messages, sysutils;
加入,谢谢,好了
----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行70.3125毫秒 RSS