Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

splash screen while program running

Posted on 2004-09-22
4
Medium Priority
?
170 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 500 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

604 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