Axshockwaveflash object prevents certain key combinations

voltzart

Member
Joined
Dec 28, 2011
Messages
11
Programming Experience
1-3
Hi,

I'm experiencing a problem which I finally narrowed down to this: the existence of an axshockwaveflash control on the current form prevents any key events (KeyDown, KeyUp, etc) from properly registering the key combinations of Ctrl+C, Ctrl+V, and Ctrl+A. These are all combinations that are used in text manipulation, so it makes sense that they would be reserved. But I need them, and I need the flash control.


I watched the KeyCode property of the event and found the following:

1.)while holding the CTRL key, the KeyCode property changes to 17 (which is the KeyCode for CTRL; this is normal)
2.)as I continue to hold CTRL, if I press the B key, the KeyCode property changes to the code for the B key (this is also normal)
3.)still holding CTRL, if I press either the C, V, or A key, the KeyCode property DOES NOT change to reflect the keycode associated with those keys, and instead remains at 17.


I'm fairly familiar with the flash control itself, and I don't know of any writable property that could prevent this problem. The only other solution I can think of is to capture the Control_Key_Pressed message (if such a message even exists) and prevent it from being passed to the flash window, much like I did with the Right Click message.

If anyone has any insight as to how I could potentially solve or work around this problem, please let me know. I'll try anything. Thanks.



EDIT:

I captured the WM_KEYDOWN message and prevented any message with wParam = 17 (the CTRL key) from being passed to the flash control window. I was successful in that flash did not know that I pressed the CTRL key, but VB still won't recognize CTRL + C or any of the other combinations I mentioned. So now I have absolutely no idea how to solve this.


EDIT2:

By the way, Ctrl+X and Ctrl+Z, which are also associated with text editing, don't work either.





SOLUTION:

I found the solution, and it's blatantly obvious. Instead of the form's KeyDown event, I should have used the ActiveX control's PreviewKeyDown event. You can delete this thread if you want. Sorry for the post.
 
Last edited:
Back
Top