Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 1st, 2004, 11:06 AM
Authorized User
 
Join Date: Dec 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Splash Screen

I have an application that loads in quite a list of data from a SQL server into a combo box. it takes a little bit of time to do this. im trying to call up a splash screen during the process so that the user is patient. my application is for a print driver so it needs to respond immediatly.

what i tried to do is at the beginning of the form_Load show a form that is my splash screen, and then call the function that fills in the combo box, but the splash screen dosnt show till the db functions are finished.

any tips?

thanks
/daniel

 
Old March 1st, 2004, 02:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The easy way is to call DoEvents after you show the splash screen. BTW the splash screen should not be loaded in the load event of the main form, but in the Sub Main method. Because I hate DoEvents, another possibility is to put the code in the first Activate or Resize event of the splash screen. Or, because that is ugly, in a event fired by the splash screen. Using ADO, my preference is to call the ado methods with the FetchAsyncNoBlocking property.

Marco
 
Old March 25th, 2004, 07:14 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by dodorisio
 I have an application that loads in quite a list of data from a SQL server into a combo box. it takes a little bit of time to do this. im trying to call up a splash screen during the process so that the user is patient. my application is for a print driver so it needs to respond immediatly.

what i tried to do is at the beginning of the form_Load show a form that is my splash screen, and then call the function that fills in the combo box, but the splash screen dosnt show till the db functions are finished.

any tips?

thanks
/daniel

 
Old March 25th, 2004, 08:29 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Daniel, I'm tying to do exactly the same thing. I tried the following without any luck.

Sub Main() 'In a module
 frmSplashScreen.Show
End Sub

Sub UserFrom_Activate () ' In Splash Screen form
 Load frmMain
 Unload frmSplashScreen
 frmMain.Show
End Sub

Did you come right, and could you offer any advice?
Richard






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to createa Splash Screen awais_syed Beginning VB 6 3 August 24th, 2007 03:29 AM
why isn't my splash screen loading? nerdman978 Beginning VB 6 2 July 5th, 2007 10:32 AM
Splash form umeshtheone Beginning VB 6 1 June 26th, 2007 06:27 PM
splash screen query demac43 Visual Basic 2005 Basics 2 May 15th, 2007 03:20 PM
Splash form problems mwphillips Beginning VB 6 1 November 19th, 2003 05:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.