3 Replies Latest reply on Mar 4, 2014 3:13 PM by CraigB

    Disabling top right X on form


      hi guys,


      I currently have a form which has a second window/canvas which pops up once the user does a specific action.  When this window is open I want to stop the user from being able to close the form using the top most x.  I know the property close allowed on the window will stop that individual window from being closed but the user can still close the window via the x on the overall application and I was just wondering if there is a way to stop this only when this specfic window is open?


      Any help would be Greatly appreciated.



        • 1. Re: Disabling top right X on form
          Moazam Shareef

          Goto Window property select closed allowed=no



          • 2. Re: Disabling top right X on form
            Michael Ferrante-Oracle

            Because you did not tell us exactly which Forms version you are using, we may not be able to offer an accurate answer.  Please read the following before making any additional posts:




            So, with that said, I am hoping you are using some Forms version that is web based only.  I am going to further assume that the "X" to which you are referring is the browser's X.  If I am correct then unfortunately, you cannot change the way the browser works (at least not easily).  You can however trap the fact that the user tried to close it and throw a message/alert so they can be made aware of what will happen if they continue.  Refer to MyOracleSupport Note 605327.1 for details.  Be aware that this will not work if you are using separateFrame=true in your configuration.





            • 3. Re: Disabling top right X on form

              As Michael mentioned, if you are trying to prevent the user from closing the Browser using the MDI Windows [ X ] - this is very difficult.  If you want to prevent the user from closing a Forms window, then this can be done through the When-Window-Closed trigger.  You can perform your tests to determine if the window is closable (eg: it's not the Specific window you don't want closed) and either allow the window to be closed or block it's closure.  You can check the :SYSTEM.EVENT_WINDOW system property to determine which window is displayed. Remember, when performing comparisons with system properties/variables you should the NAME_IN function instead of direct reference.  For example:



              -- Use this...
               -- instead of this...