by Jesper Blomquist (1 Submission)
Category: OLE/COM/DCOM/Active-X
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
This is an example based on the technique of using ActiveX EXE components to multithread. This code shows how to multithread without the need of a form and timer control, and also without the need of events (which are slow and no good when you want to thread a dynamic number of objects. The trick is to implement an interface). This example code is programmed in a very short amount of time, so have understanding if you find the it a bit sloppy.
I think that I don't lie when I say that you will have a hard time finding a VB multithread example (that actually works) with fewer lines of code!!
Instructions:
Compile the ThreadServer project.
Open the "Client" project, add a reference to the "threadServer" COM object and run the client.
-Good luck
Assumes
Compile the ThreadServer project.
Open the "Client" project, add a reference to the "threadServer" COM object and run the client.
Download Thread Server (5 KB)