|
-
Feb 6th, 2020, 12:51 AM
#1
Re: using VbTrickThreading-master examples without the typelibs for Callback and Mar
 Originally Posted by jsvenu
As I said when we add a button to fThreaded form in activex dll project MyForms and try to add the usercontrol through the button as follows:
...
...we get the following error( in msgbox )when we run the app in conpiled mode and click on this button on displayed fThreaded form.
err:711,Invalid class string.
Looking for object with ProgID: ucTest.ctlTest,MyForms
No, I cannot reproduce that...
As said, this kind of threading is as safe as can be.
So (just in case), you should *not* include any of tricks "threading-support" modules -
neither into the AxExeThreading2-project, nor should they be included in MyForms-Project.
They are not needed at all.
My guess is, that you need to recompile the OCX-Project (or re-register the OCX).
Or your ProgID ("ucTest.ctlTest") is wrong.
If I try that with "wellknown ProgIDs" (for the IE-WebBrowserControl, or Krools CCR-OCX),
it works without any problem (in IDE and compiled).
Here is the complete code of fThreaded.frm in Ax-Dll MyForms:
Code:
Option Explicit
Private Sub Form_Load()
Caption = Caption & " ThreadID: " & App.ThreadID
End Sub
Private Sub Command1_Click()
Controls.Add("Shell.Explorer.2", "WebBrowser1").Visible = True
Controls.Add("VBCCR16.TextBoxW", "TextBox1").Visible = True
End Sub
HTH
Olaf
-
Feb 6th, 2020, 01:18 AM
#2
Thread Starter
Hyperactive Member
Re: using VbTrickThreading-master examples without the typelibs for Callback and Mar
 Originally Posted by Schmidt
No, I cannot reproduce that...
As said, this kind of threading is as safe as can be.
So (just in case), you should *not* include any of tricks "threading-support" modules -
neither into the AxExeThreading2-project, nor should they be included in MyForms-Project.
They are not needed at all.
My guess is, that you need to recompile the OCX-Project (or re-register the OCX).
Or your ProgID (" ucTest.ctlTest") is wrong.
If I try that with "wellknown ProgIDs" (for the IE-WebBrowserControl, or Krools CCR-OCX),
it works without any problem (in IDE and compiled).
Here is the complete code of fThreaded.frm in Ax-Dll MyForms:
Code:
Option Explicit
Private Sub Form_Load()
Caption = Caption & " ThreadID: " & App.ThreadID
End Sub
Private Sub Command1_Click()
Controls.Add("Shell.Explorer.2", "WebBrowser1").Visible = True
Controls.Add("VBCCR16.TextBoxW", "TextBox1").Visible = True
End Sub
HTH
Olaf
Dear Olaf,
I already corrected the ProgID to MyForms.ucTest in the post #136 but I was getting the same error which I solved by using Trick's post
http://www.vbforums.com/showthread.p...-Marshal/page2 #71
Thankyou for the example.
regards,
JSVenu
-
Feb 9th, 2020, 08:09 PM
#3
Re: using VbTrickThreading-master examples without the typelibs for Callback and Mar
Why haven't you moved in these two days?
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
|