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:可以设置快捷键,也可以在程序中设...
阅读全文
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...
阅读全文