Hi,
How to add a form of another application in your mdiform?
I want a form from an activex .exe application to act like an mdi child in my mdiform.
Regards,
Maurice
Printable View
Hi,
How to add a form of another application in your mdiform?
I want a form from an activex .exe application to act like an mdi child in my mdiform.
Regards,
Maurice
Look for the API SetParent:
http://www.codeguru.com/forum/showth...hreadid=219863
JeffB
This will not work since the help about the SetParent function says:
The new parent window and the child window must belong to the same application.
Microsoft might just want us to believe that, but from experience I know that it is possible to plae other applications inside a MDI window. There are a few limitations, like Messageboxes, modal forms and system windows, like the desktop and the taskbar.
Hi Cakkie,
The only API I need is SetParent or do I need more API's to do what I want?
Can you point me in the correct direction?
Maurice
You will need to get the hwnd (handle of window) of the window you want to make your parent.
This can be done using one of numerous window API calls, like Findwindow. Once you have the hwnd you want, you just need to call the setparent. It will accept the hwnd of the window you want, and the hwnd of the new parent window. In this case that would be you MDI form. Each form in VB has a hwnd property, so no API calls are needed to get that one.
Once you call the setparent, the window will appear inside the MDI form.