Jump to content

Free Form creation


Recommended Posts



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);
  tform4:= TUniForm4.create(uniapplication);

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.


Link to comment
Share on other sites

  • 5 months later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...