PDA

Click to See Complete Forum and Search --> : Getting Key Events


john tindell
Oct 6th, 2004, 04:42 PM
Im just messing learning about vector graphics and now i want to move my object about.

I have used the KeyDown event on the main form. Heres my problem, if i hold down two keys at the same time, it only acts like one is being pressed, the second.

How can i get it to work when two keys are pressed?

I searched and found


private void frmMain_Load(object sender,EventArgs e)
{
this.KeyPreview = true;
}

protected override bool ProcessKeyPreview(ref System.Windows.Forms.Message m)
{
/* code here */
}

But ive had no luck with it.


BTW i am using the Arrow keys to move my object.

Thanks:thumb: