Solved

insert other program's main form into my form

Posted on 2004-09-17
5
133 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 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:Mohammed Nasman
ID: 13356444
points to me
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

775 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