Solved

Need to Load an EXE file inside a MDI form

Posted on 2008-10-16
2
556 Views
Last Modified: 2013-12-26
Hi all,

I'm building an application that is a wrapper for everthing this company needs to do. I have all of their forms, Webbrowser, utilites etc. loading up as child forms in a parent MDI form. The only other thing this company uses is a program that runs all of their Client info and Sales. They would like me to make that executable load up inside my MDI form so they basically can open my program and never have to leave it. I'm not sure how I can do this.... maybe the setparent API?? Could I set that application as a child of my MDI form? Any other implementation ideas?

If any of you have done this.... the code snippet would be great!
0
Comment
Question by:md0333
2 Comments
 
LVL 25

Accepted Solution

by:
Luis Pérez earned 500 total points
ID: 22738415
I guess SetParent could be what you're looking for. MDI parent windows are specially prepared to contain other windows, so it will manage well. But you'll need to get the hWnd of the main window of the application that you want to embed inside your MDI. One possible approach to this is using FindWindow API, that will return the hWnd of a window based on it's window bar title. If the title of the application'stitle bar is more or less unique, you can then use FindWindow to get it's hWnd and then use SetParent to make it child of your MDI form.
0
 

Expert Comment

by:anil_marar
ID: 23508563
Container for EXE files
Hi, I have three seperate Applications(exe) files belonging to same bussiness. I need to make a container application for these applications. I have tried it by using the setparent API. But since the applictions has MDI forms in it, it is not woriking properly. Can somebody help me in this issue ? Thanks in advance.

Regards
Anil
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now