VB Application exiting


I am currently converting a VB 6.0 Application to VB.net. The VB.net application will Start up ; I can enter my User ID/ Password and then it just exits

The Main line code is as follows:

Public Sub Main()
    On Error GoTo Startup_Err
   Application = New CApplication
   'run the application

        Exit Sub

        'if there is an error at this point it is fatal
End Sub

The program goes to Exit Sub, End Sub then exits completely

Any Idea why this is happening ???
Who is Participating?
iboutchkineConnect With a Mentor Commented:
     Public Sub Main()

        Dim f As New Form1()

      End Sub

That is your approach.  Note: The application will end when the instance of f (top-most form) is closed.
Check what are you doing n the form when you enter User ID/PWD. Do yoou close the form?
That will be an answer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.