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 form
Private 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