Y YourEyes Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-16 #1 如何设置BUTTON1的快捷键为ctrl+enter或ctrl+alt等这样的不规则组合?? 多谢大哥指教!!
教 教父 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-16 #2 可能只有将Form的KeyPreview设为True,然后再它的OnKeyDown里头判断按键,再调用 Button1.Click了。
B bubble Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-19 #3 form.KeyPreview:=true; procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (key = VK_return) and (ssctrl in shift) then Button1.Click; end;
form.KeyPreview:=true; procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (key = VK_return) and (ssctrl in shift) then Button1.Click; end;