Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

insert other program's main form into my form

Posted on 2004-09-17
5
Medium Priority
?
139 Views
Last Modified: 2010-04-05
Hi,
I have a program with a form.
Now I want to run another program and insert its mainform to my application's form?

How to do?

Anyone can help?

Regards
0
Comment
Question by:wangzheng
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 800 total points
ID: 12090755
Hello

  use SetParent API to do that, First get the handle using FindWindow, then use the SetParent to set the new handle of the application

Here's a sample to insert notepad into your form

procedure TForm1.Button1Click(Sender: TObject);
var
  H : THandle;
begin
  H := FindWindow('Notepad',nil);
  if H >0 then
    Windows.SetParent(H,Handle)
end;

HTH

Regards,
Mohammed
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 13356444
points to me
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

885 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