Solved

splash screen while program running

Posted on 2004-09-22
4
162 Views
Last Modified: 2010-05-02
I have a program shows a splash screen while the program is running in the background.

The problem is the splash screen is greyed out  most of the time the program is running.  Why?

thanks
0
Comment
Question by:running32
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 12127678
If your background process is performing tasks in a loop, then your splash form will not receive events from the system and appear hung.
Placing a DoEvents statement in the loop of your background process should resolve the problem.  DoEvents will allow the system to "service" your splash screen.

Hope it helps
0
 
LVL 5

Expert Comment

by:KarcOrigin
ID: 12130134
Try this:

Public Sub Main()
  SplashScreen.Show
  Doevents
  Load MainScreen
  MainScreen.Show
End Sub

In the MainScreen form's Activate event write this:

Private Sub MainScreen_Activate()
  Unload SplashScreen
  Set SplashScreen = Nothing
End Sub

Cheers!
0
 
LVL 1

Expert Comment

by:crjor
ID: 12130810
My code will look something like this

Sub Main
0
 
LVL 1

Accepted Solution

by:
crjor earned 125 total points
ID: 12130864
Try this:

Public Sub Main()
  frmSplash.Show vbModal
  Doevents
  frmMain.Show vbModal
End Sub

Public Function Initialize() as Boolean
  Initialize = False
 ' Your initialization code here
 ...

  Initialize = True
End Function

In the Splash Screen form's Activate event write this:

Private Sub frmSplash_Activate()
  While Initialize = False
     Doevents
  Wend
  Unload Me
End Sub

cya!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now