How to use delphi to make hotkeys in programs? Please, if possible, in detail.
|
2 answers
Register Handler
Application.OnMessage := AppMessage; Handler itself
procedure TfmMain.AppMessage(var Msg: TMsg; var Handled: Boolean); begin if (Msg.message = WM_KEYDOWN) and (Msg.wParam = VK_F1) then SendHelpMessage(Handle); end; That's all
|
Even if you use mainMenu or PopUpMenu, you can immediately assign hot keys to the action.
In the inspector, the ShortCut property defaults to none.
|