Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic .NET (http://www.programmingforums.org/forum19.html)
-   -   How to handle keyboard events in an app containing ActiveX Controls ? (http://www.programmingforums.org/showthread.php?t=5299)

George Giolfan Aug 7th, 2005 3:07 AM

How to handle keyboard events in an app containing ActiveX Controls ?
 
1. I am trying to create a custom media player based on Windows Media Player ActiveX control. I want a form that contains only the control, and another with the rest of the interface (buttons and position slider). I want a common keyboard handler for the two forms. This works fine with the second form, but sometimes when the form containing the Media Player control has focus and I press a key, nothing happens. It seems to be related to focus (pressing Tab seems to affect the problem). Also I would like to disable the focus cue (a light colored rectangle around the Media Player control).
2. I am using the WebBrowser ActiveX control to display some information in a program. I am navigating to "about:blank" and then using the Document property to add the information. The problem is that if the user presses a key combination normally used in Internet Explorer (such as F5 for Refresh) while the control has focus it is interpreted by the control. I tried to set the Handled property of the EventArgs instance I get in the event handler, but it seems that the event is not raised event with KeyPreview set to True.


All times are GMT -5. The time now is 2:04 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC