Multithreading in visual basic 6.0

前端 未结 5 1137
小蘑菇
小蘑菇 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:26

    Create "Active X" controls to manage your code. Each control has its own thread. You can stack multiple controls doing the same thing, or have individual controls doing unique things.

    EG, You make one to download a file from the net. Add ten controls and you have ten individual threaded downloads running, independent of the thread which the actual program is running. Essentially, they are all just interactive, windows, controlled by an instanced mini-dll program.

    Can't get any easier than that. You can throttle them, turn them on and off, as well as create more, or remove them, as needed. (Indexing just like any other of the "Objects", on a form. Which are all just active-x controls, which are simply managed by the vb-runtime dlls.)

提交回复
热议问题