События KeyPress и KeyDown не вызываются для Tab - как определить ее нажатие |
Previous Top Next |
Code: |
type TForm1 = class(TForm) private procedure CMDialogKey(var msg: TCMDialogKey); message CM_DIALOGKEY; end;
var Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.CMDialogKey(var msg: TCMDialogKey); begin if msg.Charcode <> VK_TAB then inherited; end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_TAB then Form1.Caption := 'Tab Key Down!'; end;
|
©Drkb::01187
DelphiWorld 6.0