Solved

VB Application exiting

Posted on 2004-09-30
1
212 Views
Last Modified: 2010-04-23
Hello

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
   Application.Create(APPLICATION_MODEL)
            
   'run the application
   Application.Run()

Startup_Exit:
        Exit Sub

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

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

Any Idea why this is happening ???
0
Comment
Question by:mat0974
1 Comment
 
LVL 28

Accepted Solution

by:
iboutchkine earned 125 total points
ID: 12191152
     Public Sub Main()

        Dim f As New Form1()
        f.Show()

        Application.Run(f)
      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
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now