insert other program's main form into my form

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
wangzhengAsked:
Who is Participating?
 
Mohammed NasmanConnect With a Mentor Software DeveloperCommented:
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
 
Mohammed NasmanSoftware DeveloperCommented:
points to me
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.