Sub Main() closes form on exit



In VB6 we have adopted a common practice of starting applications from Sub
Main() in a module. Within Sub Main() we open any one of a number of main
application forms, depending upon what command-line argument was passed in.
This all worked great.

However, under VB.NET in VS 2003 the form we bring up disappears as soon as
Sub Main() ends, presumably because the form object falls out of scope.

I've read some place that forms persist in VB6 but don't in VB.NET. Can
anyone explain this problem and how to get around it?

Thanks,

Tom


.



Relevant Pages

  • Re: ComClass + Events
    ... verwende statt Events lieber Callback. ... erstelle eine Klasse in der du die Referenz vom VB6 Objekt merkst, ... ' A creatable COM class must have a Public Sub New() ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: ComClass + Events
    ... verwende statt Events lieber Callback. ... erstelle eine Klasse in der du die Referenz vom VB6 Objekt merkst, ... ' A creatable COM class must have a Public Sub New() ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: Handle leak in Windows 2003 Authorization Manager?
    ... Since the sample is in VB6, ... releases it's objects when the sub terminates. ... > keep the Authz context around as long as the app keeps the AzMan context ... > Best regards, ...
    (microsoft.public.platformsdk.security)
  • VB6 + VC++ : how to avoid flicker?
    ... I create a simple VB6 Window application (a void form) and I define ... Private Sub Form_Load ... VB6 draws on the screen. ...
    (microsoft.public.dotnet.languages.vc)
  • VB6 + VC++ : how to avoid flicker?
    ... I create a simple VB6 Window application (a void form) and I define ... Private Sub Form_Load ... VB6 draws on the screen. ...
    (microsoft.public.vb.general.discussion)