WinForms Keypress absence solution (C#)? *Solved*
Hello,
I'm rendering a Direct3D window on a panel control in C# on my main form. The only other control is a drop down list. I want to be able to handle keypress events to change what is rendered by DirectX, but a Panel control doesn't have Keypress events.
I thought that the main form would handle the key press events because the panel couldn't, but it's clearly not. Does anyone have a solution for this problem?
I'd render the DX result onto the form itself except that the main form can't take focus from the drop down menu, and so I still am not able to handle keypress events on the actual DX window.
Thanks
- GeekPlusPlus
[Edited by - GeekPlusPlus on June 3, 2005 3:15:55 PM]
Just from memory, I believe there is a KeyPreview property for the entire form. Try that.
It's hard to say without seeing the form code.
If you are overriding the on keypress event, make sure you are passing anything you don't handle yourself to the base class.
If you are overriding the on keypress event, make sure you are passing anything you don't handle yourself to the base class.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement