I've got a 2 form windows application in VB Net 2012
On loading form1, I want to check if some settings have been set. If not then form1 is hidden and form2 (the settings screen opened)
Private Sub Form1_Load() Handles Me.Load
If My.Settings.ftpServer = Nothing Or My.Settings.userName = Nothing Or My.Settings.passWord = Nothing Or My.Settings.path = Nothing Then
Me.Hide()
Dim oForm As Form2
oForm = New Form2()
oForm.Show()
oForm = Nothing
End If
End Sub
On first run, it's showing both forms. After settings are done, subsequent runs just show form1.
What have I done wrong?