Author Topic: Show a form from another.  (Read 3194 times)


  • Full Member
  • ***
  • Posts: 162
  • I can smell your presence ...
    • Sora-Kun
Show a form from another.
« on: September 06, 2010, 09:12:35 pm »
i have two forms called respectively "form1" and "form2", with the next unit names "main_unit", "unit1".
I want to show the "form2" from the "Form1" which is the main form.
Please not that the 'form2' will apply some changes to the objects on the "form1".
Please Help !
Thanks a lot  :)
if nothing suites you, make it your self!
The Revolution, Genesis. The next generation IDE.
If you want to help, PM me.

Made in Lazarus.
Soon, in The WWW.


  • New Member
  • *
  • Posts: 42
Re: Show a form from another.
« Reply #1 on: September 06, 2010, 09:51:05 pm »
perhaps like this?


be sure the changes you do in form2 on formmain dont destroy anything

Lazarus 1.3 SVN 44197 * FPC 2.7.1 SVN 26822
Linux: 3.2.0-4-686-pae * Debian wheezy
Windows: W98


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1926
Re: Show a form from another.
« Reply #2 on: September 06, 2010, 11:05:24 pm »
Normally Forms added in the IDE are already created but not shown.

so in main_unit add "uses unit1;"
Then Form2.Show or Form2.ShowModal should be enough.
If you need to change values in main_unit, add
"uses main_unit;" in unit1 below the implementation keyword.


TinyPortal © 2005-2018