PDA

Click to See Complete Forum and Search --> : Form from AxtiveXDLL into MDIForm


don
Aug 10th, 1999, 04:02 PM
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

donvmeel@hotmail.com



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

ErikKratz
Nov 11th, 1999, 07:54 PM
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

Antonio Begue
Nov 23rd, 1999, 08:04 AM
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

yiming
Nov 23rd, 1999, 08:09 AM
What u trying to do ???

Antonio Begue
Nov 23rd, 1999, 08:16 AM
I want to know which form call a second form

Gaurav
Nov 23rd, 1999, 06:52 PM
U'll need to use the GetParent API call for this.

------------------
Gaurav Mahindra
gmahindra@extentia.com

izzy4505
Jun 11th, 2006, 09:33 PM
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!