Making a control pass events to underlying form

  • Thread starter Thread starter Jerry Spence1
  • Start date Start date
J

Jerry Spence1

I have a form with a number of controls which lie on top of each other. I
had a feeling there was a control property which would allow its events to
be passed through to the parent (so that I don't have to duplicate events).
Am I right?

-Jerry
 
Jerry Spence1 said:
I have a form with a number of controls which lie on top of each other. I
had a feeling there was a control property which would allow its events to
be passed through to the parent (so that I don't have to duplicate events).


If you are referring to keyboard events, set the form's 'KeyPreview'
property to 'True'.
 
Herfried K. Wagner said:
If you are referring to keyboard events, set the form's 'KeyPreview'
property to 'True'.

Thanks Herfried. I was actually hoping I could do the same with mouse
clicks. I have a picturebox inside a form, which I can move around. When I
click on the picture, I want to get the e.X and e.Y for the form, not the
picturebox. Any ideas?

-Jerry
 
Back
Top