Product : Engine, Version : 5.0.0.1033, ArticleID : 41023657

HowTo : KeyDown - KeyUp events

Article41023657
TypeHowTo
ProductEngine
Version5.0.0.1033
Date Added8/2/2004
Submitted byH.Berende
Keywords

Subject

KeyDown - KeyUp events

Summary

If an event handler for the key-up event is defined, the event is fired twice (check the attached project).
If event handlers are defined for both the key-down event as well as the key-up event, the key-down event is fired once, however, the key-up event is never fired.

See the attached project.

Solution

You have to set the axVDPro1.Actions.TranslateKeyEvents=true; in order to avoid the double firing of the key events.
Also it is not the right way to check the firing of events using message boxes of windows. You should better use
"Console.WriteLine(e.keyCode.ToString()+" keyup");" and see the results in the output window.