elGringo Posted October 17, 2016 Share Posted October 17, 2016 Can anyone explain, why in login demo there is a TUniLoginForm1 showed first? In which place of code is that? Can't find it! 1 Link to comment Share on other sites More sharing options...
mhmda Posted October 18, 2016 Share Posted October 18, 2016 This is by the uniGUI Framework itself. Link to comment Share on other sites More sharing options...
elGringo Posted October 18, 2016 Author Share Posted October 18, 2016 mohammad thnx! So, how to repeat it? I created simple App with 1 Main form and 1 Login Form - when I started - I saw Main form. Where is Login form - that shoud start automatically ?))) Then I just checked Visible:=false to Main form, and Login form appeared first also can't understand when and how Login Form was Created ? Didn't see anywhere code like Loginform:=TLoginForm.Create in spite of that everywhere function like function fEncryptLink_LoginForm: TfEncryptLink_LoginForm; begin Result := TfEncryptLink_LoginForm(UniMainModule.GetFormInstance(TfEncryptLink_LoginForm)); end; So - how it works in UniGUI - we don't need to create it in memory and Free then? Instances created on Create of Main? Does this approach safe for memory leaks? Link to comment Share on other sites More sharing options...
estrify Posted October 18, 2016 Share Posted October 18, 2016 Hi, I think that when you derive (and register) a form from TUniLoginForm, this form will be automatically created and shown by framework for each new session, unless you especify "Handled:=true" in the OnBeforeLogin procedure of UniMainModule... Regards, Link to comment Share on other sites More sharing options...
elGringo Posted October 18, 2016 Author Share Posted October 18, 2016 Yes, but this handler (OnBeforeLogin) is empty in logindemo. So, I tested I have Main form and LoginForm TfEncryptLink_LoginForm = class(TUniLoginForm) I start App and i see main Form I set Handled:=true in OnBeforeLogin and it is again MainForm on Start So, how to repeat logindemo? Can't understand))) Link to comment Share on other sites More sharing options...
estrify Posted October 18, 2016 Share Posted October 18, 2016 I have Main form and LoginForm TfEncryptLink_LoginForm = class(TUniLoginForm) Are Main form and LoginForm derived from TUniLoginForm?... Make sure that only one form is derived from TUniLoginForm and all your forms (login one also) are correctly registered (initialization section with its RegisterAppFormClass)... Link to comment Share on other sites More sharing options...
WildFrag Posted October 18, 2016 Share Posted October 18, 2016 use wizard for create login form 1 Link to comment Share on other sites More sharing options...
elGringo Posted October 18, 2016 Author Share Posted October 18, 2016 Tnhx, i just added it from File>New Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now