Solved

FORM on another FORM

Posted on 2001-09-16
4
207 Views
Last Modified: 2010-04-06
Hi I want to reuse a form as a part of a mainform. Is it possible to use the form as a control. I've tried to set the property parent (parent was a panel) etc. But the form will still  be a standalone form.

0
Comment
Question by:Avataris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6485509
Hello
 
  you have to show the form first,

//==
  Form2.show;
  Form2.Parent := Panel1;

but if you have Delphi5, try to use the frames

0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6485514
also may it's view, but not show within the panel, so adjust the top and left properties

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.show;
  Form2.Parent := Panel1;
  Form2.Left := 10; // or any position you would like
  Form2.Top := 10;
end;
0
 

Accepted Solution

by:
duti earned 50 total points
ID: 6485528
Hi,

In Delphi 5, use the docking stuff.

Put a panel on the mainform.  When you want to reuse the form2, do following :

form2.ManualDock(formMain.panel1);
form2.Show;
// alClient = to fill the complete panel
form2.Align := alClient;
0
 

Author Comment

by:Avataris
ID: 6485671
Thank you :)
0

Featured Post

Technology Partners: 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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