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.
LVL 14
B_DorseyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

YiogiCommented:
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)
0
B_DorseyAuthor Commented:
VB6 ... new thread?
0
YiogiCommented:
Yup new thread. I can't help you much with VB6 as I never did it but simply googling it up came up with this:
http://www.freevbcode.com/ShowCode.Asp?ID=1287

It basically has all the info to create a new thread in those obsolete versions :). I have only done threads with Delphi and DotNet programming languages. VB6 was never something I liked, so never did anything but write macros with it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

RobSampsonCommented:
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.
0
YiogiCommented:
Yup DoEvents basically executes any pending windows events before continuing. I do dislike it though.
0
B_DorseyAuthor Commented:
thanks, took a while to readup on all that, there has to be a better way :(
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.