|
-
Oct 10th, 2002, 12:19 PM
#1
Thread Starter
Lively Member
Problem with long procedure
Hello,
I have a procedure that imports a file into a DB and it could take up to 30 seconds to complete the procedure.
When the user executes this procedure, moves to another program that is open, then come back to the VB program, the VB program doesn't respond (freezes) until the procedure is over.
How do I get the form to not "freeze"?
Thanks in advance.
ttlai
-
Oct 10th, 2002, 12:24 PM
#2
try placing DoEvents in the loop if you have a loop coded. otherwise, put doevents right before the function call you are doing that is taking so long.
-
Oct 10th, 2002, 12:24 PM
#3
Frenzied Member
You need to add doevents within the procedure, which executes all events before continuing, such as mouse moves, form activate events etc.
-
Oct 10th, 2002, 12:27 PM
#4
Thread Starter
Lively Member
-
Oct 10th, 2002, 06:32 PM
#5
Software Eng.
Here's a link to some code that supposed to act like "DoEvents" but twice as fast.
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
|