cmdolcet
asked on
How to delete a User control on a mouse leave event?
How can I delete the control when I move off the mouse hover over if a label. The code is below:
Private UserControl As UcGauges = New UcGauges
Private Sub lblGaugeID_EditScreenDescription_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblGaugeID_EditScreenDescription.MouseHover
Using tempUcGauges As Form = New Form
tempUcGauges.Location = New Point(300, 300)
tempUcGauges.Controls.Add(UserControl)
tempUcGauges.TopMost = True
tempUcGauges.ShowDialog()
End Using
End Sub
Private Sub lblGaugeID_EditScreenDescription_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblGaugeID_EditScreenDescription.MouseLeave
End Sub
End Class
What do you mean by "Delete control"? Seeting UserControl = Nothing? Or removing user control from tempUcGauges form? Or hiding form/control?
ASKER
Ark,
It would be removing the control after I leave the mouse hover area.
The form appears just fine but its removing it once the user moves the mouse off the intended area.
It would be removing the control after I leave the mouse hover area.
The form appears just fine but its removing it once the user moves the mouse off the intended area.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.