B_Dorsey
asked on
multiprocessing script
everytime I create a process it waits for it to be completed...
Is there a way I can, for instance connect to a database, get a bunch results and while its doing that constantly change a message on the screen in a textbox?
I dont know what I am doing wrong in general (no specific piece of code) but when I write code it just stalls... for instance if I create a database connection to retrieve a bunch of records, and I physically drag the form box around the screen it seems frozen until its done processing.
Any help appreciated.
Is there a way I can, for instance connect to a database, get a bunch results and while its doing that constantly change a message on the screen in a textbox?
I dont know what I am doing wrong in general (no specific piece of code) but when I write code it just stalls... for instance if I create a database connection to retrieve a bunch of records, and I physically drag the form box around the screen it seems frozen until its done processing.
Any help appreciated.
What version of Visual Basic are you using? If dotnet you can create a backgroundworker (the easy way) or program it to start a new thread by yourself (the slightly harder but my preferred way)
ASKER
VB6 ... new thread?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm not much of a VB6 programmer, but before you run your query, if you put
DoEvents
then while you're looping of the recordset it should "repaint" the screen.
It is apparently processor intensive though....
Regards,
Rob.
DoEvents
then while you're looping of the recordset it should "repaint" the screen.
It is apparently processor intensive though....
Regards,
Rob.
Yup DoEvents basically executes any pending windows events before continuing. I do dislike it though.
ASKER
thanks, took a while to readup on all that, there has to be a better way :(