herculanojs Posted February 19, 2018 Share Posted February 19, 2018 I am using the following code to minimize the form in the application. However this is triggering the form's onclose event. What is wrong ? form.Script.Add(StringReplace(form.WebForm.JSId,'_id','',[rfReplaceAll] +[rfIgnoreCase]) +'.on('+#39+'minimize'+#39+',function(w){w.setVisible(!w.isVisible());w.setActive(!w.isHidden());if (!w.isVisible()){ajaxRequest(w, "minimized", ["param0=+"minimized]);}});'); Link to comment Share on other sites More sharing options...
Sherzod Posted February 20, 2018 Share Posted February 20, 2018 Hi, Can you explain a little more? What is this code?Where and how do you use it? Best regards, Link to comment Share on other sites More sharing options...
herculanojs Posted February 20, 2018 Author Share Posted February 20, 2018 This code is to be able to minimize the form, since the minify button of the form has no effect. So in the forum at some point, I was able to find this code that makes the form minimized. This works fine as long as the freeonclose property of the form is as true. My forms are dynamic, and to avoid a cost of creation for each time the user requests a form, I modified my application, so that it does not destroy the form anymore onclose. So the form is already created inside the application, just call it again. However when I changed the freeonclose property to false, the codes I give in the onclose of the form are being fired. I need to minimize the form in the application, the form with freeonclose being false, and not firing the event on the onclose when I minimize. following example follows Project10.rar Link to comment Share on other sites More sharing options...
Sherzod Posted February 20, 2018 Share Posted February 20, 2018 Hi, Can you try this approach ?!: Add this event for example: UniForm1 -> ClientEvents -> ExtEvents -> function window.hide: function window.hide(sender, eOpts) { return false; } Link to comment Share on other sites More sharing options...
herculanojs Posted February 20, 2018 Author Share Posted February 20, 2018 perfect tanks 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