Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   Apps (http://www.delphipages.com/forum/forumdisplay.php?f=8)
-   -   Can I open an app inside another apps interface? (http://www.delphipages.com/forum/showthread.php?t=192496)

KevinW 02-08-2008 11:23 PM

Can I open an app inside another apps interface?
 
Ok, this is a weird one that's a bit hard to explain.

What I need to do is create an MDI application that I can use to open other applications into, as if they are forms within the MDI. The end result would be a single MDI form that might have programs such as MSN, Word, Excel, etc... "running" inside of it. The programs wouldn't in fact be sharing memory, I just need the interfaces to be encapsulated. The idea is to encapsulate these programs so they can all be moved, minimized, closed, etc... all by manipulating the MDI form

I'm thinking what I need to look for is some way of cloning the users desktop. I have no idea if this is even possible, but any ideas or suggestion on what to research would be helpful.

Jasser 02-09-2008 01:57 AM

RE: Can I open an app inside another apps interface?
 
This is an example of Excel running with-in your program:


[DELPHI]USES ShelAPI;
.................................................. .........
.................................................. .........
var
wHandle : THandle;
begin
//Run Excel or any program.
ShellExecute(Application.Handle,'Open','Excel.exe' ,nil,nil,SW_NORMAL);

//Wait for it to be loaded.
Sleep(500);

//Get the handle of the other program using the caption of the window.
wHandle := FindWindow(NIL,'Microsoft Excel - Book1');

//Now change the parent of the other program to be your program.
Windows.SetParent(wHandle,self.Handle);[/DELPHI]

Regards,
Abdulaziz Jasser

KevinW 02-09-2008 10:55 AM

RE: Can I open an app inside another apps interface?
 
That's BEAUTIFUL.... I was hoping it would be as simple as setting the parent window, but I wasn't sure how to do it. It looks like this will do exactly what I want....

thanks a million

RottenDeadCode 02-09-2008 02:15 PM

RE: Can I open an app inside another apps interface?
 
That is something i as wanting to know a few time ago ,
when i go with this again ,then to give a try with this code .


All times are GMT. The time now is 12:55 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.