Solved

How to make a TForm a component on another TForm

Posted on 2008-10-15
4
231 Views
Last Modified: 2011-09-20
This is a case of "I knew it once - but I can't remember - or find it!"

I'm pretty sure it is possible to place a TForm on another form.  But I can neither figure it out nor concoct a search that comes up with the information I need.

Some example code would be nice to refresh my memory.
0
Comment
Question by:DMTrump
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
2266180 earned 500 total points
ID: 22727010
say form1:TForm1; form2:TForm2; you place form2 on form1 like this:

begin
  form2.parent:=form1;
end;

ta-da :D (dont' forget to set size, position accordingly ;) )
0
 
LVL 1

Expert Comment

by:jplevene
ID: 22729391
I think you are talking about frames.

In your project goto File and New and create a frame.  Design it and save it.

In your form under "Standard" on the components pallette, the first entry should be Frames, click this and click on the form where you want to insert it.  A dialog will then appear with a list of all the frames in your project, select which one and voila.

You can align frames as none, client, top, botton, etc.  You can do customisation, etc.
0
 

Author Closing Comment

by:DMTrump
ID: 31506533
ta-da Indeed!  I knew it was something simpl but for some reason I just couldn't remember!  What would I do without you ciuly?

(Sorry about the delay in responding - for some reason my email put the EE notices in my spam box!)
0
 

Author Comment

by:DMTrump
ID: 22732741
jplevene,  Thanks for the pointer about frames - in this case the much simpler solution provided by ciuly was what I was looking for (and knew was doable)  But I appreciate the reminder about Frames - something I've not used a lot and need to think more about!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

867 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