473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to Know When Previous Lines Have Been Processed in Form_Load?

nicebasic
I'm writing a program in VB. When the program loads, I have to put some code in Form_Load to be processed. After that, an audio file should be played to show that the program is ready to work.

My problem is that I can't know when the previous lines in the Form_Load have finished processing to be able to start playing an audio file.

Imagine that you have to do large arithmetic calculations in Form_Load to allow the program be ready. Many programs put a Splash screen to let the user know that the program has been started and make him/her wait for some time.

If I hide my form when it starts and show it in the last line of Form_Load, that doesn't solve the problem either.

My problem is this:

1. How to show a form named "frmSplash" immediately when my application starts and let the main form of the application "frmMain" be processed in the background?

2. When "frmMain" finishes processing, how can I know that it's finished processing to hide or Unload "frmSplash" and turn "frmMain" to visible?

I don't know how to use DoEvents. Can anyone help me solve this problem?

Thank you in advance.
Jan 5 '11 #1

✓ answered by Guido Geurs

Maybe this is even better:
Start formmain but invisible and show the form with the loading info.
When loading is done, unload the form with info and make formmain visible. (see attachment)

3 1446
Guido Geurs
767 Expert 512MB
Attached is an example.
The program starts with the FormSplash witch starts FormMain but isn't visible.
Formmain fills the textboxes.
When finished, FormSplash is invisible and FormMain becomes visible.
Jan 6 '11 #2
Guido Geurs
767 Expert 512MB
Maybe this is even better:
Start formmain but invisible and show the form with the loading info.
When loading is done, unload the form with info and make formmain visible. (see attachment)
Jan 7 '11 #3
Thank you, Mr. Guido Geurs,

You're really innovative. You have used a Frame to simulate a Progress Bar.

Thank you for your help and attention.

This version is much better.

Good luck.
Jan 7 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Marc Ederis | last post by:
Hello, I'm having a problem with sending data with sockets over a dial-up connection. When I use the send function, it will happily send a buffer of a megabyte and more in one shot. But of...
2
by: ABC | last post by:
How to I know the previous page is clicked to forward the current page? As our web site have many methods to enter the web page, I need to know the users clicked which link or which part of...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
6
by: JohnR | last post by:
I'm running into a 'timing' or 'race' condition on my form. All textbox controls are bound to a datasource, but certain other controls (like labels) need to be updated when you move to a...
1
by: irrbloss | last post by:
Hi, I'm building a C#-application that will simplify my daily work (adding/removing/updating users in the AD). I'm using functions from the System.DirectoryServices-namespace. When I have added a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.