Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load data behind the scene in VB 6.0

Status
Not open for further replies.

75cl

Programmer
Nov 1, 2001
43
US
Is there a way that you can instantly showed your instantly form then load the data behind the scene, so users dont have to wait..... Thank You In Advance
 
Hi 75cl

Use the sub main procedure in
Project menu -> Project Properties -> Startup Object
Sub Main()
code
code
code
Form1.show
End Sub

Jon
 
I already has load some data in the Sub_main. And I need to reload some of the data in child forms when user select from the Menu in MDI form. How do you get around this?
 
Jon,
Can you show me how this can be done?

thank you
 
75cl

Private Sub MDIForm_Load()
MDIForm1.AutoShowChildren = False ' Set to hide child forms
End Sub

Private Sub mnuForm_Click() ' menu click
Dim ChildForm As New frmChild ' Declare new form.
ChildForm.Caption = "Child Form" ' Set its caption.
Load ChildForm ' Load it; it's hidden
'code
'code
'code
MDIForm1.AutoShowChildren = True
ChildForm.Show ' show form
End Sub

Jon
 
75cl

P.S.

If your are going to use multiple child forms reset the AutoShowChildren to false before End Sub
...
MDIForm1.AutoShowChildren = True
ChildForm.Show ' show form
MDIForm1.AutoShowChildren = False
End Sub

Jon


 
When you make a database call via ADO, it's typically a synchronus call, which means your app has to wait until it's complete. There's no way to sneak a DoEvents or anything into the Execute() event.

But what you can do is use ADO asynchronous calls. It requires much more discipline on your part, as you have to make sure not to make any additional database calls until the first one comes back. See the MSDN documentation for details at
Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top