Jaume Posted July 1, 2013 Posted July 1, 2013 Hi, i'm using free forms, as i thought i could create the form when i wanted. When i tested it, I see that i can create it but it must be shown directly, it can't be shown after some pice of code or after some time. if i have a variable tform4: TUniForm4; in the private section of MainForm and i code this to a button of MainForm: procedure TMainForm.UniButton2Click(Sender: TObject); begin tform4:= TUniForm4.create(uniapplication); tform4.init(); end; I got this Warning: Form must be shown after it is created as a dialog. So can't i create a form a leave it created without showing it? Thank you very much. Quote
Jaume Posted December 24, 2013 Author Posted December 24, 2013 As a response to my old post, what should it be the best way to have a form like Delphi style? I mean, having a form created but not showed inside another form? As i do it right now, it's creating it, showing it and hidding it. This is the only way i have to avoid the "warning: Form must be shown after it is created". This makes all slower as i tested. If i don't show/hide the form, creating and showing the first form is like 2-3 seconds faster in my case. But for example in this case: I have a form where customers records are in a grid (Form_Customers) -> Then i have a search form to filter the customers inside Form_Customers. This search form has all the functions to generate the SQL code for the first form, so it must be created as the Form_Customers is created. This is the way i do it on Delphi, but I'm opened to other ways to do the same job but more efficient for UniGui. The inconvinient is that right now we don't have the documentation to understand why is slower, or what are the best practices for the Forms creations. That's why i need your help please. 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.