Event handling of a user control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • coderjoe@gmail.com

    Event handling of a user control

    I'm new to VB.Net and I'm using the 2003 version.

    I created a user control that has two labels on it. The two labels are
    side by side. The first is bold font and will be used to display a
    line number. The second will show the text of the line.

    These labels completely cover the control. I am adding the user
    control to a form at runtime in a control array. I want the user to be
    able to drag them to different positions on the form during runtime,
    but the mousedown, mousemove, and mouseup events of the form are not
    triggered because the labels cover the user control and therefore, the
    labels receive the events.

    How do I pass these mouse events to the user control so I can handle
    the event from the form the control is placed on?

  • Herfried K. Wagner [MVP]

    #2
    Re: Event handling of a user control

    <coderjoe@gmail .com> schrieb:[color=blue]
    > I created a user control that has two labels on it. The two labels are
    > side by side. The first is bold font and will be used to display a
    > line number. The second will show the text of the line.
    >
    > These labels completely cover the control. I am adding the user
    > control to a form at runtime in a control array. I want the user to be
    > able to drag them to different positions on the form during runtime,
    > but the mousedown, mousemove, and mouseup events of the form are not
    > triggered because the labels cover the user control and therefore, the
    > labels receive the events.[/color]

    <URL:http://dotnet.mvps.org/dotnet/samples/misc/XmlSerializatio n.zip>

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

    Comment

    Working...