Frederick Posted April 4, 2023 Share Posted April 4, 2023 When I receive a parameter and UniMainModule encounters it, I set the Handled to True, thereby bypassing the login form. However, the parameter is meant to show a form that is not the main form. How do I prevent the main form from showing and instead, call another form? VCL has the Application.ShowMainForm:=False. Does UniGUI have an equivalent property? 1. http://myapp.com?showsubform=yes 2. UniMainModule -> Handled:=True; (Login form bypassed) 3. MainForm shows (I want this form hidden) 4. SubForm is displayed. -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1565) Quote Link to comment Share on other sites More sharing options...
Frederick Posted April 5, 2023 Author Share Posted April 5, 2023 No such functionality in UniGUI? If yes, could you give me a method of suppressing the display of the main form before the sub form is displayed? Quote Link to comment Share on other sites More sharing options...
Tokay Posted April 5, 2023 Share Posted April 5, 2023 Quote 3. MainForm shows (I want this form hidden) You could at this stage (optionally, in OnShow event) hide form, and later another will show. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 5, 2023 Share Posted April 5, 2023 On 4/4/2023 at 11:17 AM, Frederick said: Application.ShowMainForm:=False. Does UniGUI have an equivalent property? You can use this approach: function window.show(sender, eOpts) { this.setHidden(true); } Quote Link to comment Share on other sites More sharing options...
Frederick Posted April 5, 2023 Author Share Posted April 5, 2023 Thanks to you both. Tokay's suggestion also works. I am partial to his because I don't have to fiddle with JS. procedure TMainForm.UniFormShow(Sender: TObject); begin MainForm.Hide; subForm.ShowModal; end; Quote Link to comment Share on other sites More sharing options...
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.