Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > Apps

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2008, 11:23 PM
KevinW KevinW is offline
Junior Member
 
Join Date: Feb 2008
Posts: 2
Default 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.
Reply With Quote
  #2  
Old 02-09-2008, 01:57 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default 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
Reply With Quote
  #3  
Old 02-09-2008, 10:55 AM
KevinW KevinW is offline
Junior Member
 
Join Date: Feb 2008
Posts: 2
Default 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
Reply With Quote
  #4  
Old 02-09-2008, 02:15 PM
RottenDeadCode RottenDeadCode is offline
Junior Member
 
Join Date: Feb 2008
Posts: 13
Default 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 .
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:07 PM.


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