更新时间:2023-12-06 08:30:16
用2表格创建新项目
Form1 with commandbutton(Button1)Public 类 Form1
私有 Sub Button1_Click(发件人作为系统。对象,e As System.EventArgs)句柄 Button1.Click
Form2.Show()
结束 Sub
结束 类
-
Form2有多种控制权..
当没有激活/鼠标离开其他形式时,表格2将自动关闭私人 Sub Form2_Deactivate(发件人作为 对象,e As System.EventArgs)句柄 我 .Deactivate
Me .Hide()
End Sub
私有 Sub Form2 _LostFocus(发件人作为 对象,e 作为 System.EventArgs)句柄 我 .LostFocus
我。隐藏()
结束 Sub
I am showing a form on a control''s mouseover.I have few controls like label,picturebox and textbox on the form.I want to hide the form on form''s mouse leave event and I have written the function to hide the form on form''s mouse leave.But when the form is seen and if I move the mouse from one control to other,the form hides and is seen again.It gives a flashing effect of the form.
How to resolve it.
create new project with 2 form
Form1 with commandbutton (Button1)Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Form2.Show() End Sub End Class
--
Form2 with many control..
Form 2 will automaticly closed when inacktivated/mouse leave to other formPrivate Sub Form2_Deactivate(sender As Object, e As System.EventArgs) Handles Me.Deactivate Me.Hide() End Sub Private Sub Form2_LostFocus(sender As Object, e As System.EventArgs) Handles Me.LostFocus Me.Hide() End Sub