procedure TfrmAskPriceBill.FormKeyDown(Sender:TObject; var Key:Word; Shift:TShiftState); begin Case key of vk_f3: begin btnSaveClick(nil); end; vk_f4: begin btnDeleteClick(nil); end; vk_f6: begin btnStorageFindClick(nil); end; vk_f7: begin btnPriceClick(nil); end; vk_f8: begin btnGoodsInfoClick(nil); end; vk_f9: begin btnPrintClick(nil); end; VK_ESCAPE: //ESC键 begin btnEXITClick(nil); end; VK_DELETE: begin key:=0; N2Click(NIL); end; VK_INSERT: begin key:=0; N1Click(NIL); end; if (ssCtrl in Shift) and (chr(Key) in ['N', 'n']) then //Ctrl+N begin btnNewClick(NIL); end; if (ssCtrl in Shift) and (chr(Key) in ['O', 'o']) then //Ctrl+O begin btnOpenClick(NIL); end; if (ssCtrl in Shift) and (chr(Key) in ['G', 'g']) then //Ctrl+G begin btnOpenInClick(NIL); end; end;
begin
Case key of
vk_f3:
begin
btnSaveClick(nil);
end;
vk_f4:
begin
btnDeleteClick(nil);
end;
vk_f6:
begin
btnStorageFindClick(nil);
end;
vk_f7:
begin
btnPriceClick(nil);
end;
vk_f8:
begin
btnGoodsInfoClick(nil);
end;
vk_f9:
begin
btnPrintClick(nil);
end;
VK_ESCAPE: //ESC键
begin
btnEXITClick(nil);
end;
VK_DELETE:
begin
key:=0;
N2Click(NIL);
end;
VK_INSERT:
begin
key:=0;
N1Click(NIL);
end;
if (ssCtrl in Shift) and (chr(Key) in ['N', 'n']) then //Ctrl+N
begin
btnNewClick(NIL);
end;
if (ssCtrl in Shift) and (chr(Key) in ['O', 'o']) then //Ctrl+O
begin
btnOpenClick(NIL);
end;
if (ssCtrl in Shift) and (chr(Key) in ['G', 'g']) then //Ctrl+G
begin
btnOpenInClick(NIL);
end;
end;