Lazarus

Installation => Windows (32/64) => Topic started by: hamza on March 25, 2020, 09:12:52 pm

Title: jump from form to another form
Post by: hamza on March 25, 2020, 09:12:52 pm
hi
Im using win10 with free pascal but how to jump from form1 to form2 and decleare the variables(regesters) as global variable on the two forms??

thank you
Title: Re: jump from form to another form
Post by: Otto on March 25, 2020, 10:16:59 pm
Hi hamza.

I would recommend you read this wiki page (https://wiki.freepascal.org/Form_Tutorial#Two_Forms_That_Can_Call_Each_Other).

Otto.
Title: Re: jump from form to another form
Post by: winni on March 25, 2020, 10:44:41 pm
Hi!

Create a unit without a form. Call it "ConstVar" - to show what to put in.

Put all the Const and Var that are needed by unit1/Form1 and unit2/Form2 into "ConstVar".
Then put in the uses of  unit1 and unit2

uses ......,ConstVar;

There you go.

Winni
Title: Re: jump from form to another form
Post by: hamza on March 26, 2020, 12:04:31 am
thank you   ,,its working well now
TinyPortal © 2005-2018