elGringo Posted October 17, 2016 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 Quote
elGringo Posted October 18, 2016 Author 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? Quote
estrify Posted October 18, 2016 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, Quote
elGringo Posted October 18, 2016 Author 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))) Quote
estrify Posted October 18, 2016 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)... Quote
elGringo Posted October 18, 2016 Author Posted October 18, 2016 Tnhx, i just added it from File>New Quote
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.