Making a control pass events to underlying form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry Spence1

    #1

    Making a control pass events to underlying form

    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


  • Herfried K. Wagner [MVP]

    #2
    Re: Making a control pass events to underlying form

    "Jerry Spence1" <jerry.spence@s omewhere.comsch rieb:
    >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'.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Jerry Spence1

      #3
      Re: Making a control pass events to underlying form


      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
      news:OG$rw%23ao GHA.4768@TK2MSF TNGP03.phx.gbl. ..
      "Jerry Spence1" <jerry.spence@s omewhere.comsch rieb:
      >>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'.
      >
      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>
      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


      Comment

      Working...