Multithreading in visual basic 6.0

前端 未结 5 1140
小蘑菇
小蘑菇 2021-02-19 06:19

How to implement multi-threading in visual basic 6.0. It would be great if someone can give an example.

5条回答
  •  再見小時候
    2021-02-19 06:42

    If the problem that you are trying to solve is a long calculation and you want to keep the UI responsive, then one possibility is to frequently call the DoEvents function within your long calculation. This way, your program can process any Windows messages, and thus the UI will respond to user commands. You can also set up a Cancel button to signal your process that it needs to end.

    If you do this, then you will need to be careful to disable any controls that could cause a problem, such as running the long process a second time after it has started.

提交回复
热议问题