Thread: keyboard handler

  1. #1
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853

    keyboard handler

    I want my Form to handle keyboard strokes. I search the msdn and found the method to do so, but the examples they have are for a textBox. Like textBox1_KeyPressed(...). I want to be able to handle the keyboard as long as the Form is active. How can I do this?

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    It should be the same thing for a Form. In fact I am sure of it.

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Ok, next question. Can I create a grid of images? I want to make a board, each space will have an image which of course would be able to change? Can this be done in a convinient way so I can access the images with some kind of indexes?
    I could create a 2D array of Images and place them on the Form, but this would take some time placing and alligning them, so if there was a grid to do this for me...

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Yeah. There is an object for this... Its ImageSet or something to that effect. Just google it or wait for someone more up on their C# to reply... I think this is Magos' chance to shine.

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I started having a nagging feeling that wasn't the right name of the class. And I do obsess about giving people misinformation like that.

    You want a ImageCollection. Enjoy.

  6. #6
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    You can just blt it normally with GDI if you wish as well.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Keyboard port using other that a keyboard
    By antoinelac in forum C++ Programming
    Replies: 4
    Last Post: 06-12-2008, 02:46 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Keyboard INT 9 handler (Handles multiple keypresses!) Problem
    By zhopon in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 12-16-2001, 10:39 AM
  4. Replies: 0
    Last Post: 12-16-2001, 10:36 AM