Click to See Complete Forum and Search --> : How to run two threads simultaneous?


snong
October 9th, 2001, 09:17 PM
I perform a computation-intensive calling, and I want to show a progressbar during the executing, but I found that during the execution, timer event is not invoked, How can I do it?
(the DoEvents function doesn't effect.)
Who can help me?

Happy to be a programmer.

Cakkie
October 10th, 2001, 01:12 AM
DoEvents should have effect, but I noticed that in some cases, this does not work the way it should, but so far, I've only seen this behavior in the VB IDE, not in the compiled EXE. So don't mind if the DoEvents comes through only one in a lifetime in the IDE, try compiling it to EXE, run the code, and it should work.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

snong
October 10th, 2001, 01:21 AM
Thanks you, Tom.
I think Doevent will work well in my own computation loop. But if I need to request another object which is supplied by the third party, I debug the code, it waits on this statement, and you find System Idole Process occupy the most machine resource. I think it's easy to do it in VC++, but how to do it in VB?
I am confuse about how VB control thread.

Happy to be a programmer.

Cakkie
October 10th, 2001, 02:01 AM
Let's just say there is NO (good) way to control threads in VB, it just isn't there. This means we will olways have to wait for our previous statement to complete, including calls to third-party controls. One light in the darkness is that VB.Net (VB7) will have multithreading capabilities, and even quite good and easy ones, only, that's nothing that's going to help us now right?

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook