Solved

FORM on another FORM

Posted on 2001-09-16
4
201 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
  • 2
4 Comments
 
LVL 22

Expert Comment

by:mnasman
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:mnasman
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

13 Experts available now in Live!

Get 1:1 Help Now