|
-
Feb 7th, 2020, 08:16 AM
#11
Hyperactive Member
Re: VB6 Threaded Forms (simple Demo)
 Originally Posted by Schmidt
As the title says, just a simple Demo which might help to "find ground again", when it comes to VB6-threading.
(there's certainly a whole lot of overcomplicating, unnecessary stuff out there).
The Demo shows real InProcess-Multithreading via a simple VB6-AX-Exe-Project.
There are no API-calls necessary, nor are there any Assembly-hacks - it's just plain VB6 - running threaded Forms in STAs.
Within the threaded Form, an external (OCX-based) Control gets loaded (since that recently came up).
To get things running:
- open and compile ExternalControl.vbp first
- then open and compile AxThreading.vbp
Ok, here the Zip:
AxExeThreading.zip
Addition:
Since the question came up, how to work with "Project-Private UserControls" (instead of loading a Control
from an external OCX onto the threaded Form, as covered in the original Demo-Zip above)...
Here a slightly changed version, which covers that case (by hosting the Thread-Forms, as well as the Private UCs in a separate AX-Dll-Project):
AxExeThreading2.zip
Have fun,
Olaf
Dear olaf,
I changed the AxExeThreading2 activex exe project in AxExeThreading2.zip to standard exe .
When I run this standard exe application I am able to display two forms in different threads which can be observed on the caption of the form which displays thread ID and the two forms are showing different thread IDs in their caption.But when we try to switch between forms by clicking on them we get the following error (in msgbox):
the action cannot be completed because other application is busy ...
What are the changes to be made in code for this standard exe to create new form with user control in new thread without using vbheader in a simple way without displaying the following error(in msgbox) when we click on different forms displayed in different threads for switching between them.
regards,
JSVenu
Last edited by jsvenu; Feb 8th, 2020 at 07:23 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|