Bernie07 Posted October 14, 2021 Share Posted October 14, 2021 Hello, If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this. Example : sName := Form1.Name; This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal. Sometimes I only want return a property without showing the form. How can I do this? Best wishes Bernhard Link to comment Share on other sites More sharing options...
Tokay Posted October 14, 2021 Share Posted October 14, 2021 Any form shows imeddiatelly and automatically when you've access to any it properties. I think that does not exists possibility to access to the hidden form. Maybe support get you a sollution. Link to comment Share on other sites More sharing options...
irigsoft Posted October 14, 2021 Share Posted October 14, 2021 41 minutes ago, Bernie07 said: Hello, If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this. Example : sName := Form1.Name; This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal. Sometimes I only want return a property without showing the form. How can I do this? Best wishes Bernhard You must read the documentation for this. unigui creates an instance of the form and if you request something from the form, the form will be displayed. Your mistake is that: Trying to use VCL in the same way as creating forms and variables in it is not a good practice with unigui. There are examples and documentation of this, forum search or documentation. maybe @Sherzod will help more. Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted October 14, 2021 Share Posted October 14, 2021 5 hours ago, Bernie07 said: Hello, If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this. Example : sName := Form1.Name; This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal. Sometimes I only want return a property without showing the form. How can I do this? Best wishes Bernhard Hello If you create a form in UniGUI, the form will be displayed regardless. If you are using UniFrame you can set parent:= to nil. With this, that frame will not be displayed. Link to comment Share on other sites More sharing options...
Abaksoft Posted October 15, 2021 Share Posted October 15, 2021 20 hours ago, Bernie07 said: Hello, If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this. Example : sName := Form1.Name; This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal. Sometimes I only want return a property without showing the form. How can I do this? Best wishes Bernhard Hello, See the best practice to retreive a variable from a form. Unigui advise to use Asynchronous mode. http://www.unigui.com/doc/online_help/index.html?synch-and-asynch-operations.htm 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