如何在Tedit中截获Alt按键,Tab按键 如何在Tedit中截获Alt按键,Tab按键 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if key=18 then showmessage('Alt按键');end; to: cjfzy(他山之石,可以攻玉。) ?Alt会把一些键屏蔽,传不到key中我想用windows消息,最好有代码 if VK_ALT in KEY then .............自已写.. 楼上的代码似乎应该为:if Shift in VK_MENU then…… procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if key=18 then key:=#0;//屏蔽end; procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if key in ['tab','alt'] then showmessage('按了TAB或ALT键');end; 你们测试过吗?tab能传入Tedit吗?alt每次都能传入Tedit吗? 通过注册热健,具体看我的贴子http://expert.csdn.net/Expert/topic/2094/2094919.xml?temp=.9453546 Delphi得到自己IP 请教下,多文档窗体动态创建显示问题 Delphi菜鸟求学 关于进度条和存储过程? 在com+类中怎么样定义一个返回数据集的函数? Access中关于日期的问题 delphi调用U8登陆信息 该怎么做呢? 如何在Form2打印Form1中DBGrid的数据 怎样动态创建控件和设置属性? 光盘路径的问题 江湖救急!请教 OleContainer,中取得 大2近制 Stream数据 怎么保存的数据库
Shift: TShiftState);
begin
if key=18 then
showmessage('Alt按键');
end;
?Alt会把一些键屏蔽,传不到key中
我想用windows消息,最好有代码
.............
自已写..
if Shift in VK_MENU then
……
Shift: TShiftState);
begin
if key=18 then key:=#0;//屏蔽
end;
Shift: TShiftState);
begin
if key in ['tab','alt'] then
showmessage('按了TAB或ALT键');
end;
tab能传入Tedit吗?
alt每次都能传入Tedit吗?
http://expert.csdn.net/Expert/topic/2094/2094919.xml?temp=.9453546