Results 1 to 1 of 1

Thread: Getting Key Events

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Getting Key Events

    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

    Code:
    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
    Last edited by john tindell; Oct 6th, 2004 at 05:00 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width