F fscdc4 Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-04 #1 一个输入销售单的界面,如何使用快捷键入 如按F1 编辑(如编辑的过程是a1) F5 打印,在哪个部分写代码,如如何代码,请给出相应的代码
Z znxia Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-04 #2 设置form.KeyPrview=true,在form.OnKeyUp事件中写: if Key=VK_F5 Then ...
B bsense Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-04 #3 方法2,给2个按钮,分别设置action,再设置其 key
D de410 Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-04 #6 VK_F1 = 112; {$EXTERNALSYM VK_F2} VK_F2 = 113; {$EXTERNALSYM VK_F3} VK_F3 = 114; {$EXTERNALSYM VK_F4} VK_F4 = 115; {$EXTERNALSYM VK_F5} VK_F5 = 116; {$EXTERNALSYM VK_F6} VK_F6 = 117; {$EXTERNALSYM VK_F7} VK_F7 = 118; {$EXTERNALSYM VK_F8} VK_F8 = 119; {$EXTERNALSYM VK_F9} VK_F9 = 120; {$EXTERNALSYM VK_F10} VK_F10 = 121; {$EXTERNALSYM VK_F11} VK_F11 = 122; {$EXTERNALSYM VK_F12} VK_F12 = 123; {$EXTERNALSYM VK_F13}
VK_F1 = 112; {$EXTERNALSYM VK_F2} VK_F2 = 113; {$EXTERNALSYM VK_F3} VK_F3 = 114; {$EXTERNALSYM VK_F4} VK_F4 = 115; {$EXTERNALSYM VK_F5} VK_F5 = 116; {$EXTERNALSYM VK_F6} VK_F6 = 117; {$EXTERNALSYM VK_F7} VK_F7 = 118; {$EXTERNALSYM VK_F8} VK_F8 = 119; {$EXTERNALSYM VK_F9} VK_F9 = 120; {$EXTERNALSYM VK_F10} VK_F10 = 121; {$EXTERNALSYM VK_F11} VK_F11 = 122; {$EXTERNALSYM VK_F12} VK_F12 = 123; {$EXTERNALSYM VK_F13}
F fscdc4 Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-04 #7 方法1中,form.KeyPrview=true出错
F formiss Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-04 #8 procedure TfrmMain.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin case Key of 112: ShowMessage('F1'); 113: ShowMessage('F2'); 114: ShowMessage('F3'); 115: ShowMessage('F4'); 116: ShowMessage('F5'); 117: ShowMessage('F6'); 118: ShowMessage('F7'); 119: ShowMessage('F8'); 120: ShowMessage('F9'); 121: ShowMessage('F10'); 122: ShowMessage('F11'); 123: ShowMessage('F12'); end;end;
procedure TfrmMain.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin case Key of 112: ShowMessage('F1'); 113: ShowMessage('F2'); 114: ShowMessage('F3'); 115: ShowMessage('F4'); 116: ShowMessage('F5'); 117: ShowMessage('F6'); 118: ShowMessage('F7'); 119: ShowMessage('F8'); 120: ShowMessage('F9'); 121: ShowMessage('F10'); 122: ShowMessage('F11'); 123: ShowMessage('F12'); end;end;