Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim f As New Form2
f.ShowDialog()
If f.checkLogin = True Then
Me.Show()
Else
Close()
End If
End Sub
Code (VB.NET)
Public Class Form2
Public checkLogin As Boolean = False
End Class