tags:

views:

17

answers:

2

i need to make a form where when a button is clicked then another form/page opens and from that for you can return to the original form in a similar fashion a main menu/sub menu works.

sorry im new to object pascal

A: 

At the FreePascal Wiki you will find a tutorial on how to use Lazarus. You can read it in several different languages.

You can also see this Developing a GUI Application tutorial.

ChuckO
A: 

Simply add the second form, and then in the button handler do a

         secondform.showmodal;

Don't forget to add the unit where "Secondform" is in to the uses clauses of the first unit.

Marco van de Voort
ok how do i then link a botton on the second form back to form 1?
haz
You don't link back. You simply set modalresult, and the 2nd form will disappear, and the showmodal call will return with the modalresult. Typicaly modalresult values are mrok and mrcancel to signal success or failure
Marco van de Voort