Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need to Load an EXE file inside a MDI form

Posted on 2008-10-16
2
559 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

765 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