Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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 August 6th, 2004, 01:12 AM
Authorized User
 
Join Date: Jul 2004
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is there a way to calculate the loadtime of a form

Hi,

My form needs to load the data from the database so it takes some time to load up all the date then the form will fully appear. So is there any way that i could get the loading time so that i can do display a load sign, until the form has fully load up the data then i will display the form.
Application i am using now is VB.Net

Snowydust
__________________
Snowydust
 
Old August 6th, 2004, 01:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

All the initialization (like database connection and dataloading ) must be done before showing the main form, if it takes some time usually a small form is displayed (like a splash screen, or a form with a progress bar)
When the data is ready and there are no errors, then the main form can be loaded.
Does that make sense?
Marco
 
Old August 8th, 2004, 12:14 PM
Authorized User
 
Join Date: Jul 2004
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There's abit of problem...
before the new form manages to load finish, the new form show up(abit, without the data actually being display)..
how to overcome this?

Snowydust
 
Old August 9th, 2004, 12:20 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Set the Startup Object (in Projet Properties) to Sub Main, add a .bas and put a public sub Main() in it. There you can display (modaless) the splash screen, and start doing all the initialization you want. At the end unsload the splash form and if everything is hunky dory display your main form.

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate running total on form and prevent text Hughesie78 ASP.NET 2.0 Basics 0 November 27th, 2007 10:35 AM
how to calculate bandwidth debuajm C# 2005 0 January 16th, 2007 07:40 AM
Calculate ivangr Visual Basic 2005 Basics 0 April 9th, 2006 04:39 AM
calculate weekdays jberk Access VBA 3 September 15th, 2004 05:54 PM
Help me How to calculate minhtri VB How-To 4 June 8th, 2004 04:06 PM





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