Original Post
I noticed that there are no key events for a panel such as OnKeyDown() and OnKeyUp(). Is it possible to make a user control of a panel that would have the events? Also, I'd need the double buffer property too. I'm suprised the panel is a bit different than a form. Any help is great. Update: Here's something I'm working with. Let me know how I can improve this.
class GamePanel : Panel
{
public GamePanel()
{
}
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
G.keyState[(int)e.KeyCode] = true;
}
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);
G.keyState[(int)e.KeyCode] = false;
}
}
[Edited by - nullsmind on May 7, 2006 7:19:43 PM]