eduardo.junqueira Posted March 21, 2017 Share Posted March 21, 2017 Are there any problems with changing the code below? ================================================== function UniForm1: TUniForm1; begin Result := TUniForm1(UniMainModule.GetFormInstance(TUniForm1)); end; By the form variable ================================================== type TUniForm1 = class(TUniForm) private { Private declarations } public { Public declarations } end; var UniForm1: TUniForm1; implementation {$R *.dfm} Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 21, 2017 Administrators Share Posted March 21, 2017 There is a big problem here.uniGUI can not work with global variables. That's why we use a function to retrieve correct instance of a form class for current session. You can also define a Free Form and create an instance in your code. var MyForm : TUniForm1; begin MyForm := TUniForm1.Create(UniApplication); MyForm.Show; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.