call a form from another and vice versa lazarus / 8-Other ---------------------------------------------------------------------- fachamix · 2009-12-31 23:10 I have 2 forms Form1 and Form2 I need them to interact, Form1 needs to change some things in Form2 , and Form2 needs to change some things in Form1 In the code of Form1, in the "uses" declaration I add the form2.pas unit called form2 And works perfect, I can use Form2 from Form1 BUT!!!!!!!!!!!!!! when I add form1 in the "uses" declaration of Form2 I get a Compiler ERROR saying something about CIRCULAR REFERENCE!!!!!!!!!!!!!!!!! I understand the circular reference, but i dont know how to do what i want ---------------------------------------------------------------------- davesimplewear · 2010-01-01 07:59 perhaps instead of using 2 forms you could use one with either a Notebook or pageControl and hide the tabs? I don't know of any way to overcome the circular reference. Good Luck ---------------------------------------------------------------------- Vincent Snijders · 2010-01-01 09:29 You can move the uses of one or two units to the implementation section. ---------------------------------------------------------------------- mmab · 2010-01-01 13:30 for ex. you have 2 forms with units, unit1 unit2 first one should look like Code: [Select]unit Unit1; {$mode delphi}{$H+} interface uses   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,   ComCtrls, StdCtrls,unit2, .... thesecond one should look like Code: [Select]nit Unit2; {$mode delphi}{$H+} interface uses   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,   ComCtrls, StdCtrls; .... implementation   uses unit1; ---------------------------------------------------------------------- fachamix · 2010-01-01 14:10 Quote from: mmab on January 01, 2010, 02:30:48 pmfor ex. you have 2 forms with units, unit1 unit2 first one should look like Code: [Select]unit Unit1; {$mode delphi}{$H+} interface uses   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,   ComCtrls, StdCtrls,unit2, .... thesecond one should look like Code: [Select]nit Unit2; {$mode delphi}{$H+} interface uses   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,   ComCtrls, StdCtrls; .... implementation   uses unit1; this worked perfectly ... thanks a lot people, thanks!!!!!!!!!! ---------------------------------------------------------------------- fachamix · 2010-01-01 20:36 where did you learn the solution ??? what lecture do you recomend me ? ---------------------------------------------------------------------- mmab · 2010-01-05 01:49 I read and googled a lot on pascal starting from delphi. And I also read other people's codes.   thats all.