Solved

splash screen while program running

Posted on 2004-09-22
4
168 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

705 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