|
-
Apr 16th, 2007, 04:58 PM
#1
Thread Starter
Hyperactive Member
[2005] Hide Slow Form Start
I'm connecting to a database and creating a dataset during the Form load event. When I start the application it appears that nothing is happening for about 30 seconds then the form appears. This is due to creation of the dataset. I moved the database connection and dataset fill into the form shown event. This allows the user to see the form immediately but none of the controls are painted until after the database stuff is complete.
I've tried using a thread but because of my limited knowledge of OOP I'm getting lost. I need to use data from textboxes to create my connection string. If I place the database stuff in a thread and try to access any object on my form, I get an error that I can't access the data without explicitly creating an instance of the class.
I tried this and it eliminated the error but, of course, the data that was loaded during the load event was available. i.e text boxes were empty and radio buttons were not selected.
vb Code:
Dim frm as New myForm
frm = myForm
Last edited by campster; Apr 17th, 2007 at 07:40 AM.
Reason: Added [2005] to title
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|