Solved

insert other program's main form into my form

Posted on 2004-09-17
5
131 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:
mnasman earned 200 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:mnasman
ID: 13356444
points to me
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now