Solved

VB Application exiting

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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 will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

910 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

21 Experts available now in Live!

Get 1:1 Help Now