You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PublicClassForm2DimKeyboardHookAsNewInputHelper.Hooks.KeyboardHookPrivateSubForm2_Load(senderAsSystem.Object,eAsSystem.EventArgs)HandlesMyBase.LoadAddHandlerKeyboardHook.KeyDown,AddressOfKeyboardHook_KeyDownEndSubPrivateSubKeyboardHook_KeyDown(senderAsObject,eAsInputHelper.EventArgs.KeyboardHookEventArgs)Ife.Modifiers=(InputHelper.ModifierKeys.ControlOrInputHelper.ModifierKeys.Shift)AndAlsoe.KeyCode=Keys.EThenDebug.WriteLine("'CTRL + SHIFT + E' pressed at "&DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))EndIfEndSubEndClass
Result
(Immediate Window, Visual Studio)
(Form2 opened by Form1)
(User presses CTRL + SHIFT + E)
'CTRL + SHIFT + E' pressed at 2019-08-17 02:26:49
(Form2 closed)
(User presses CTRL + SHIFT + E again)
'CTRL + SHIFT + E' pressed at 2019-08-17 02:27:03
The text was updated successfully, but these errors were encountered:
When instantiating a hook in a form the hook is not disposed together with the form when the form is closed.
Steps to reproduce
Code
Form1:
Form2:
Result
(Immediate Window, Visual Studio)
The text was updated successfully, but these errors were encountered: