Solved

VB Application exiting

Posted on 2004-09-30
1
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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