Jump to content

Minimize form - triggering the form's onclose event


herculanojs

Recommended Posts

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...