capturing keyboard inputs
-
i would like to create a windows form application which captures the keyboard inputs. Can someone tell me the best and easiest method? thanks...
-
i would like to create a windows form application which captures the keyboard inputs. Can someone tell me the best and easiest method? thanks...
Do you mean Windows Forms in .NET or a dialog form? For forms in .NET, you'r on the wrong discussion board - use the Managed C++/CLI board[^] instead. Otherwise, any window in a Windows app that has the keyboard focus will receive WM_KEYDOWN and WM_KEYUP messages, and also WM_CHAR messages if TranslateMessage is caled in the app/thread's message loop. If you want to catch keyboard input system-wide, you can use a hook. See SetWindowsHookEx[^] Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Do you mean Windows Forms in .NET or a dialog form? For forms in .NET, you'r on the wrong discussion board - use the Managed C++/CLI board[^] instead. Otherwise, any window in a Windows app that has the keyboard focus will receive WM_KEYDOWN and WM_KEYUP messages, and also WM_CHAR messages if TranslateMessage is caled in the app/thread's message loop. If you want to catch keyboard input system-wide, you can use a hook. See SetWindowsHookEx[^] Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
i got my answer it is helpfull thanx...
--we were great,and we will rise again-- --------Don't forget-------------------- --always comes daylight after night-----