S
Shawn
I have an application that starts with a Module (Sub Main) that calls a few forms in order. When I close the next to last form, the last form is called and closes immediately. I have application.run(me) in the load event for that form and it opens fine if I call it at the beginning of the module. Here is the module code....
Module mdlLogon
Sub main()
Dim OpenFrmDbConnect As New FrmDBConnect()
OpenFrmDbConnect.Show()
If Form1.ds = Nothing Then
Dim Result As DialogResult
Result = MessageBox.Show("You must setup the database connections, Click Ok to do so or Cancel to quit the program.", "Initial Setup",
MessageBoxButtons.OKCancel, _MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)
If Result = DialogResult.OK Then
Dim OpenFrmSetup As New FrmSetup()
OpenFrmSetup.Show()
ElseIf Result = DialogResult.Cancel Then
Exit Sub
End If
End If
Dim OpenFrmLogon As New FrmLogon()
OpenFrmLogon.Show()
' This is the call that dies below..
Dim OpenForm1 As New Form1()
OpenForm1.Show()
End Sub
End Module
This is driving me crazy!! Please someone help!!!!
Module mdlLogon
Sub main()
Dim OpenFrmDbConnect As New FrmDBConnect()
OpenFrmDbConnect.Show()
If Form1.ds = Nothing Then
Dim Result As DialogResult
Result = MessageBox.Show("You must setup the database connections, Click Ok to do so or Cancel to quit the program.", "Initial Setup",
MessageBoxButtons.OKCancel, _MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)
If Result = DialogResult.OK Then
Dim OpenFrmSetup As New FrmSetup()
OpenFrmSetup.Show()
ElseIf Result = DialogResult.Cancel Then
Exit Sub
End If
End If
Dim OpenFrmLogon As New FrmLogon()
OpenFrmLogon.Show()
' This is the call that dies below..
Dim OpenForm1 As New Form1()
OpenForm1.Show()
End Sub
End Module
This is driving me crazy!! Please someone help!!!!