Can I get a KeyPressed event in PictureBox

  • Thread starter Thread starter active
  • Start date Start date
A

active

I have a picturebox usercontrol sitting on a usercontrol. I need a KeyPress
event in the PictureBox.

I suppose I could have a property in the pictureBox that is accessed by a
call in a KeyPressed event in the UserControl. Right?

Kind of kludge - is there a more direct way? The usercontrol needs no
KeyPress event at all and the Picturebox needs them all.


Cal
 
Is this KeyPress event to fire only when the picturebox control has the
focus?
What would cause the user to give the picture box the focus on the form?
Are you trying to create a zoned bitmap?
 
After I thought about it a while I realized I didn't ask the correct
question so I posted again and got a good response. Turns out a call to
GetAsyncKeyState is exactly what I need. Of course a managed equivalent
would be better.

Thanks for the interest
Cal
 
Back
Top