Results 1 to 40 of 172

Thread: using VbTrickThreading-master examples without the typelibs for Callback and Marshal

Threaded View

  1. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2015
    Posts
    356

    Re: using VbTrickThreading-master examples without the typelibs for Callback and Mar

    Dear Trick,


    In the following attached activex exe code running standalone in modmain.bas we display fMain in modeless way

    Code:
    Sub Main()                              
        If App.TaskVisible Then fMain.Show  
    End Sub
    I add usercontrol to my activex exe standalone project thru Load User Control button as follows:

    Code:
    Private Sub Command1_Click()              
        Controls.Add("AxThreading.UserControl1", "Ctl1").Visible = True             'load usercontrol Control onto this ThreadForm
    End Sub
    When I click on the Load User Control button I get the following error in msgbox

    ---------------------------
    AxThreading
    ---------------------------
    Run-time error '720':

    'AxThreading.UserControl1' is not a valid control type
    ---------------------------
    OK
    ---------------------------





    But when I make fMain to display in modal fashion as follows and click on the Load User Control button it works fine.

    Sub Main()
    If App.TaskVisible Then fMain.Show vbModal
    End Sub


    1. Please clarify how to make this activex exe application to work when fMain is displayed in modeless way.


    When I click on Create and show an additional threaded Form button in the displayed form I get another instance of the same form displayed in new thread.

    When I click on the Load User Control button in this new form I get the following error

    ---------------------------
    AxThreading
    ---------------------------
    Run-time error '339':

    Component '' or one of its dependencies not correctly registered: a file is missing or invalid
    ---------------------------
    OK
    ---------------------------

    2. Please clarify how to make this work fine in this new form displayed in new thread.


    regards,
    JSVenu
    Attached Files Attached Files
    Last edited by jsvenu; Feb 3rd, 2020 at 04:18 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
  •  



Click Here to Expand Forum to Full Width