Solved

VB Application exiting

Posted on 2004-09-30
1
214 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
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 …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 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