Results 1 to 7 of 7

Thread: Form from AxtiveXDLL into MDIForm

  1. #1

    Thread Starter
    New Member
    Join Date
    May 1999
    Location
    Zevenbergen, Holland
    Posts
    5

    Post

    I want to load a form from an ActiveX DLL into my project into my MDIForm.

    I can load a form into my project. That works fine but if i set the Activex form to mdichild = true then my project return with an error :

    No MDIForm available to load !

    Does anyone know how to handle my problem


    ------------------
    Don van Meel
    System Developer
    Citee Holland

    [email protected]



    [This message has been edited by don (edited 08-11-1999).]

  2. #2
    New Member
    Join Date
    May 1999
    Posts
    4

    Post

    Don,

    The problem occurs because you ActiveX DLL does not include a MDI form. Thus when you load your form in the ActiveX DLL which has its MDIClient an error occurs.

    Basically what you want to do is to make your form a MDI_Client at run time. The only solution I could find so far is to use a set of API calls.

    For your information an MDI form consist out of two windows. The one your looking for is the MDI_Client Window. (If you need more information on this subject see the Dan Appleman Book on the Win32 API). You need to make your form a client to that Window.

    I don't have the exact code on me right now, but I can mail it to if you like. It's about two lines. For now I will give you the procedure.

    1) Get handle to the MDI_Client Window use the GetWindow API call

    2) Set your forms parent to the MDI_Client window with the SetParent API call

    Your window is now part of the MDI form. However it will behave somewhat different when maximizing the form.

    I hope this was a little bit helpful,

    Regards,

    Erik

  3. #3
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87

    Post

    in this code:

    formA: with text1 and command1
    Private Sub Command1_Click()
    Form2.Show
    End Sub

    formB: with command1
    Private Sub Command1_Click()
    Form1.Text1.Text = "Test"
    End Sub

    i need to do something like this but without knowing wich form call formb and put "Test" in the form that call the formb

  4. #4
    New Member
    Join Date
    Jun 1999
    Location
    Stafford, England
    Posts
    6

    Post


    What u trying to do ???

  5. #5
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87

    Post

    I want to know which form call a second form

  6. #6
    Lively Member
    Join Date
    May 1999
    Location
    India
    Posts
    97

    Post

    U'll need to use the GetParent API call for this.

    ------------------
    Gaurav Mahindra
    [email protected]



  7. #7
    New Member
    Join Date
    Jun 2006
    Posts
    1

    Re: Form from AxtiveXDLL into MDIForm

    Did anybody ever come up with a solution to this? I have an MDI child form loaded in an ActiveX dll. I'd like to pop this form up within an MDI form in the host application, but I get the exact same error. VB6. Thanks!

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