Thread: Multiple Key Press

  1. #1
    Is Trying to Learn
    Join Date
    Mar 2006
    Location
    Hutton, Preston
    Posts
    215

    Multiple Key Press

    i have got a program running but i want a certian key press combination to run

    i want to have the user to press Ctrl + Alt + Insert Keys to activate a message box but at the moment all you have to do it press one of them keys to activate it or even any key on the keyboard will activate the window. how can i make it so it waits for all of the keys?

    this is the code i have soo far

    Code:
    void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift)
    {
    if(VK_CONTROL && VK_MENU && VK_DELETE)
    {
    ShowMessage("You Pressed the right sequence of keys to enter");
    }
    Thanks
    Last edited by peckitt99; 11-13-2007 at 04:03 AM.

  2. #2
    Is Trying to Learn
    Join Date
    Mar 2006
    Location
    Hutton, Preston
    Posts
    215
    I think i might have cracked this thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Press a key
    By siavoshkc in forum C++ Programming
    Replies: 30
    Last Post: 01-21-2006, 10:15 AM
  2. Press "Enter" key to quit the program
    By Vitamin_C in forum C++ Programming
    Replies: 7
    Last Post: 12-18-2005, 08:25 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  4. Exit on key press?
    By dazed in forum C Programming
    Replies: 3
    Last Post: 12-09-2002, 07:46 PM