S
Saber
glb is a global string, I want when moving mouse to a picturebox, change
border style of picturebox.
the code shown below do that but MouseLeave event fires less than a second
after MouseHover,
even without leaving the mouse pointer or moving that.
I also tried MouseEnter event instead of MouseHover, but they act same here.
Private Sub p1_MouseHover(ByVal sender As Object, ByVal e As
System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter,
p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter,
p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
sender.BorderStyle = BorderStyle.FixedSingle
glb = sender.Name
End Sub
Private Sub p1_MouseLeave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter,
p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter,
p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
If glb = sender.Name Then sender.BorderStyle = BorderStyle.None
End Sub
border style of picturebox.
the code shown below do that but MouseLeave event fires less than a second
after MouseHover,
even without leaving the mouse pointer or moving that.
I also tried MouseEnter event instead of MouseHover, but they act same here.
Private Sub p1_MouseHover(ByVal sender As Object, ByVal e As
System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter,
p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter,
p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
sender.BorderStyle = BorderStyle.FixedSingle
glb = sender.Name
End Sub
Private Sub p1_MouseLeave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter,
p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter,
p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
If glb = sender.Name Then sender.BorderStyle = BorderStyle.None
End Sub