Jump to content

Minimize form - triggering the form's onclose event


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


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...