I am trying to add a label just where my mouse is using a context menu "Add Label" but it goes to a different position. How can i do this. Below is my code.
VB Code:
Private Sub cmnuAddLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmnuAddLabel.Click Dim lbl As Label lbl = New Label lbl.Text = "My Lable" AddHandler lbl.MouseDown, AddressOf MyEventHandler lbl.Location = New System.Drawing.Point(Control.MousePosition.X, Control.MousePosition.Y) Me.Controls.Add(lbl) End Sub




Reply With Quote