J jozosoft Unregistered / Unconfirmed GUEST, unregistred user! 2006-11-28 #1 如何让form中的表格按下 Ctrl+T时,去调用 myProc 过程? <br>记得好像是在 keydown中定义(不要搞Hook),一时记不起检测虚拟组合键的方法了,请虾哥们帮一下!
A Avalon Unregistered / Unconfirmed GUEST, unregistred user! 2006-11-28 #2 procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;<br> Shift: TShiftState);<br>begin<br> if (ssCtrl in Shift) and (Key=Ord('T')) then<br> begin<br> ShowMessage('1111');<br> end;<br>end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;<br> Shift: TShiftState);<br>begin<br> if (ssCtrl in Shift) and (Key=Ord('T')) then<br> begin<br> ShowMessage('1111');<br> end;<br>end;
C chenxian515 Unregistered / Unconfirmed GUEST, unregistred user! 2006-11-28 #3 Ctrl+T的ASCII键码为20,你应该知道怎么调用了吧
K KK168 Unregistered / Unconfirmed GUEST, unregistred user! 2006-11-28 #4 同意搂上的,if key = #20 then ... 在keyPress事件中写吧。