Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use splash screen to preload other forms?

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
0
0
I have an application which currently has 4 main forms.

frmMain,
frmSplash,
frmR,
frmS.

frmMain is the Startup object.
It is an MDI Parent.
frmSplash is called from the frmMain_Load event & uses ShowDialog()


frmR, & frmS are data-entry forms & require quite a lot of data to be loaded for combo box selections. They both take approx 10secs to load. At the moment this delay is instigated when the user wants to display the form:
Dim frmR as new frmR
frmR.MDIParent = Me
frmR.Show

I would like to load these forms while the splash screen is displayed, so as to hide the delay.

Any suggestions?



James Goodman MCSE, MCDBA
 
Probably the simplest way is to set an app-wide boolean variable to false, and then have the last form that is loading stuff in the background change it to true.

Then in frmSplash load event, loop until the value is true:

do until blnIsDone=true
loop
me.close()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top