C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-16-2008, 01:44 PM   #1
Registered User
 
C_ntua's Avatar
 
Join Date: Jun 2008
Posts: 1,279
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?
C_ntua is offline   Reply With Quote
Old 10-16-2008, 01:47 PM   #2
Banned
 
master5001's Avatar
 
Join Date: Aug 2001
Location: Visalia, CA, USA
Posts: 3,699
It should be the same thing for a Form. In fact I am sure of it.
master5001 is offline   Reply With Quote
Old 10-16-2008, 01:51 PM   #3
Registered User
 
C_ntua's Avatar
 
Join Date: Jun 2008
Posts: 1,279
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...
C_ntua is offline   Reply With Quote
Old 10-16-2008, 02:05 PM   #4
Banned
 
master5001's Avatar
 
Join Date: Aug 2001
Location: Visalia, CA, USA
Posts: 3,699
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.
master5001 is offline   Reply With Quote
Old 10-16-2008, 02:55 PM   #5
Banned
 
master5001's Avatar
 
Join Date: Aug 2001
Location: Visalia, CA, USA
Posts: 3,699
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.
master5001 is offline   Reply With Quote
Old 10-16-2008, 04:15 PM   #6
Registered User
 
valaris's Avatar
 
Join Date: Jun 2008
Location: RING 0
Posts: 468
You can just blt it normally with GDI if you wish as well.
valaris is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 03:25 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22