How to show form after Splash Screen closes

  • Thread starter Danny J. Lesandrini
  • Start date
D

Danny J. Lesandrini

I just posted this in the vb.languages forum but realized that it probably fits
better here. Excuse the multiple posts please.


My project is set to load frmSplash first, which runs some housekeeping stuff.
When that finishes, I want to open frmMain. This code DOESN'T WORK ...

Me.Close()
gfrmMain = New frmMain
gfrmMain.Show


the object variable, gfrmMain is declared in a public module.
Public gfrmMain As frmMain


The form loads ... flashes and disappears when frmSplash is closed. If I set
frmSplash Not Visible, then the form remains, so clearly it's a scope issue. I
thought that if the variable is declared as a public frmMain, in a public module,
it would remain after frmSplash is closed ... but it doesn't

How can I accomplish this:
Open frmSplash
Run housekeeping code
Close frmSplash
Open frmMain

Thanks in advance for any suggestions you may have
 
H

Herfried K. Wagner [MVP]

* "Danny J. Lesandrini said:
I just posted this in the vb.languages forum but realized that it probably fits
better here. Excuse the multiple posts please.

My project is set to load frmSplash first, which runs some housekeeping stuff.
When that finishes, I want to open frmMain. This code DOESN'T WORK ...

Me.Close()
gfrmMain = New frmMain
gfrmMain.Show


the object variable, gfrmMain is declared in a public module.
Public gfrmMain As frmMain


The form loads ... flashes and disappears when frmSplash is closed. If I set
frmSplash Not Visible, then the form remains, so clearly it's a scope issue. I
thought that if the variable is declared as a public frmMain, in a public module,
it would remain after frmSplash is closed ... but it doesn't

<URL:http://www.google.de/groups?selm=u#[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top