T
topboy
Unregistered / Unconfirmed
GUEST, unregistred user!
能不能一按ESC键就把窗口关掉!要求代码尽量精简,不管焦点在窗口的哪个控件上,都可以!
还有把Enter换成Tab,要最精简的!谢谢!
还有把Enter换成Tab,要最精简的!谢谢!
Form.OnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key = VK_ESCAPE then Close;
end;
if Key = VK_ENTER then Keybd_Event(VK_TAB, 0, 0, 0);