How to detect window close event and do some task before exiting

Hi 
Anyone knows how to detect window close event and do some task before exiting ?
Sridhar
Solved!
Go to Solution.
Attachments:
window close event.JPG ‏34 KB

Yes .You can discard the panel close event by passing "TRUE" boolean value to the "discard ?" terminal which is lied in the right side of that panel close(filter) event.& It will work in executables.  See attached picture.
Attachments:
Panel Close.JPG ‏12 KB

Similar Messages

  • How to detect browser close event in flex ?

    How to detect browser close event in flex ?

    This link may help:
    http://cookbooks.adobe.com/post_Close_event_of_browser_or_browser_tab-18211.html
    Best,

  • How can I quit (close) Photoshop and keep all windows so that the next time I open Photoshop the fil

    How can I quit (close) Photoshop and keep all windows so that the next time I open Photoshop all the files that I had open are there already in the same position as when I closed Photoshop?
    I've been a Fireworks user for over 10 years and just switched to Photoshop. I cannot find a setting that will enable all my file windows to reopen when I quit Photoshop. This is really a problem since I often work on several files at the same time.
    Please let me know if the feature exists or point me to where I can post a message for a new feature to be implemented. The feature is a must for any designer working on large projects.
    Thanks!

    There is no such functionality. You could perhaps create a script that stores that info in a custom text file and arranges them accordingly in the workspace, but that's as good as it gets...
    Mylenium

  • How To Get The CLOSE Event In a JSP File?

    Hello everybody,
    Right now I am working in a JSP project which is about access log, when the users start , oprate, or close the system, the access log system works. I am in trouble in that when the users close the system, how can I get the close event?
    The JSP file contains the following fields :
    Close Window
    How to add code to get the CLOSE Event and submit to the service?
    And If I hit the "Close Button"(on the right-top of the window), how can I get the CLOSE event, too?
    Can anyone tell me?

    1. Add a hidden field:
    <input type="hidden" id="status" value="">2. modify <a href="index.jsp" onclick ="parent.window.close( );">Close Window</a> with <a href="index.jsp" onclick ="closefn();">Close Window</a>3. Add a javascript
    <script language="javascript">function closefn(){
    document.getElementById('status').value="close";
    document.form.action="";
    document.form.method="post";
    document.form.submit();
    parent.window.close( );
    }4. Now on the action page get the value of status by request.getParameter("status"); and log it.

  • How to handle form close event or escape key press event for user defined f

    Experts,
    Please let me know how to handle form close event or escape key press event for user defined form...
    Thanks & Regards,
    Pravin.

    Hi
    You can catch the form close event like this
    If ((pVal.FormType = 139 And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_CLOSE)) And (pVal.Before_Action = True)) Then
          Try
                   SBO_Application.SetStatusBarMessage(pVal.EventType.ToString())
          Catch ex As Exception
                    SBO_Application.SetStatusBarMessage(ex.Message)
            End Try
          End If
    Hope this helps
    Regards
    Arun

  • Window close event

    hai friends
    have a peace day.
    i want to capture a window close event.
    for eg. while closing the window i want display alert msg.
    its work into forms but i want in main window.
    please give me sample code
    thanks
    rex

    hai thanks
    i have one more doubt.
    there was a problem in my project
    if click signout button my database change properly YES to NO
    but without signout they close the window , there was a problem
    the database would not change.
    how can i restrict this one.
    give idea.
    thanks
    rex
    Message was edited by:
    kingofpeace

  • How to mark window close button as "unsaved"?

    Using SWT, you can change the main window quit/close icon/button (in upper left corner of title bar) to indicate that the file/whatever of the application has not been saved. The code to do that in SWT is something like this -
    Shell shell = new Shell(new Display(), SWT.CLOSE | SWT.TITLE | SWT.BORDER | SWT.MIN);
    shell.setModified(true);
    Is this feature available in Java FX 2.2? If not, has there been a bug/request filed for it?

    I had a question going in the same direction: "Is there any way to disable the close button in a decorated stage?" but from your answer to the previous question, I guess this is not possible... could you please confirm this? A workaround would be to set an event handler to consume the window close event. Looks like I'll need to go that way. Or could you suggest a better way?I don't think it's possible with to disable the button in JavaFX 2.2 - if you did, it would provide an inconsistent native windowing experience for the user anyway as I've never seen a close button on a Windows 7 app disabled.
    However, as you point out, you can capture (and handle or ignore) the events if generated. You can do this by setting an onCloseRequest event handler for the window and calling event.consume() in the handler. (relevant javadoc comment):
    https://docs.oracle.com/javafx/2/api/javafx/stage/Window.html#setOnCloseRequest%28javafx.event.EventHandler%29
    Called when there is an external request to close this Window. The installed event handler can prevent window closing by consuming the received event.------
    You could check out my related answer at StackOverflow: http://stackoverflow.com/questions/12874664/javafx-entirely-customized-windows, for some other thoughts on this on customizing decorated and undecorated windows, but I think most has already been said in this thread.

  • How do one add FCP Events and Projects created in previous versions

    Just upgraded to OS X Yosemite and FCP X 10.1.4. The files that I saved under a seperate folder (which I named as Unused Events/Projects) did not convert. How do I get those Event and Projects in new Macintosh HD's projects and events?

    TThe fiolders have to be in specific locations to be recognized by FCP. They have to be in Final Cut Events and Final Cut Projects either at the root level of a secondary drive or in the Movies folder.

  • How to detect phone call event

    Hi there ,
    I want to know and use the phone no. that called me,
    how do I catch the event and use the phone no.
    moshe

    There is no AIR API to do this.  You might be able to use a native extension assuming there are native APIs to get this information.

  • Hello there, if i had installed a windows on bootcamp and for some reasons the windows had infected, does the mac gets infected or harmed? sorry im transforming from pc to mac and i just want to know .. thank you

    if i had installed a windows on bootcamp and for some reasons the windows had infected, does the mac gets infected or harmed?

    Yes, when you run Win via BootCamp, the computer is a "real" Windows computer and just as vulnerable as any other Windows machine. It its the operating system, not the hardware, that creates vulnerability.
    However, it also means you basicaly have two independent computers that happen to share the same physical space. The Mac side, as others have said, is not vulnerable to assaults that are made on the Windows side, so do not go installing a pile of anti-virus garage on the Mac side. It is unneeded at this time and will basically ruin your Mac's performance. The Windows side WILL need some form of protection.

  • How can I detect Form Open event and Import data event ?

    We are using Adobe Designer 7 and Adobe Reader 7.0.5. When we open a Form, Initialize event is being called. Similarly when we Import any data, initialize event is being called. At the Initialize event, I want to know whether it is caused by Opening the Form (or) Importing the data. Please respond as we were completely stuck up with this issue.

    My screenshot was only an example how you can approach the issue. I wasnt saying that you should try it with AI....
    Just take a closer look into the DAQmx Events and you will discover something like this:
    hope this helps,
    NorbertMessage Edited by Norbert B on 10-05-2007 02:35 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    DAQmxEvent.PNG ‏11 KB

  • Detect window closing event in AIR application

    How do I detect the window closing event in an AIR app? Tried
    the following.
    deactivate and windowDeactivate events in the
    WindowedApplication tag.
    addEventListener(Event.CLOSING, onClose);
    addEventListener(AIREvent.APPLICATION_DEACTIVATE onClose);
    addEventListener(AIREvent.WINDOW_DEACTIVATE, onClose);
    None of them seem to work.
    Any ideas?
    Thanks
    CS

    The following works for me:
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    closing="traceEvent(event)"
    windowDeactivate="traceEvent(event)"
    applicationDeactivate="traceEvent(event)">
    <mx:Script>
    <![CDATA[
    public function traceEvent(event:Event):void{
    trace(event.type);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    As does:
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    applicationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.AIREvent;
    public function init():void{
    this.addEventListener(Event.CLOSING, traceEvent);
    this.addEventListener(AIREvent.WINDOW_DEACTIVATE,
    traceEvent);
    this.addEventListener(AIREvent.APPLICATION_DEACTIVATE,
    traceEvent);
    public function traceEvent(event:Event):void{
    trace(event.type);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>

  • How to detect back browser event in javascript?

    How to detect browser event in javascript?
    Not working for me. Since i love mozilla to use.
    Working in IE.
    function HandleBackFunctionality(event)
    if(window.event)
    alert("Browser1");
    if(window.event.clientX < 40 && window.event.clientY < 0)
    alert("Browser back button is clicked...");
    else
    alert("Browser refresh button is clicked...");
    else
    alert("Browser2");
    if(event.currentTarget.performance.navigation.type == 1)
    alert("Browser refresh button is clicked...");
    if(event.currentTarget.performance.navigation.type == 2)
    alert("Browser back button is clicked...");
    }

    Firefox doesn't have a catch-all event object (window.event), but you can create event listeners for the objects of interest. I don't know whether the toolbar is one of those; probably not, since why should web pages be able to see what you are doing on the toolbar??
    If we discard the idea of looking for events outside of the page and focus on what is happening inside the page, have you looked at this:
    https://developer.mozilla.org/en-US/docs/Web/API/Window.onbeforeunload

  • Window: close event handler

    I have a button (action="dialog:ADD_MEMBER" useWindow="true" windowEmbedStyle="inlineDocument" windowModalityType="applicationModal" windowHeight="600" windowWidth="700"), which open a new window in the same TaskFlow. This window can be closed by using the special (my af:commandButton) button and by using common window close button ('X'). I want to write my custom close event handler in the second case. How can I do it?

    Hi,
    don't think you can. Did you check ifthe return listener fires ?
    Frank

  • How to detect the OS version and the hardware info??

    Hi all, according to the project needs, I to know how to detect OS version and the hardware info.
    The point is to detect client's OS version, weather Win98, 2000, XP, Vista.
    I have been search the information for several days already.
    But can not really found a example which returns the OS version like"Windows XP Version 2002 *****".
    And also could not find the CPU type such as"Core 2 due, or  pentium D".
    Is there anyone have done this before?
    Thanks.
    The Info I need looks like the photo below.
    Message Edited by EricLu on 07-21-2009 08:09 PM

    Well, in fact I have the VI and also read the topics as well...... The searching tag is OS info , system info......... After reading your post, now I understand the relation between the version number and the real OS version now, tks.  And another problem is, the processor type returned within the VI have only 4 type:"INTEL 386, INTEL 486, PENTIUM, Unknown". 
    It can not really return my CPU TYPE. For example the desktop I’m using now is a Pentium, D , 2.80G, 2.80G.. and it only returns type "Pentium". That's why I'm asking is there any other way to do this...... (( Please forgive me if you can not really know what I'm talking about in my first post, now I know how bad my english is.......   ))  I guess I can only try to find out the solution from the registry then... Thanks for your information and reply. 
    Message Edited by EricLu on 07-21-2009 09:25 PM
    Message Edited by EricLu on 07-21-2009 09:26 PM

Maybe you are looking for

  • Can't Start Up in Safe Mode

    I've followed the directions here 8 times now: http://docs.info.apple.com/article.html?artnum=107393 I've tried it with various timing alterations, and I just can't seem to get started up in safe mode. Any clue what I might be doing wrong? Thanks.

  • How do I print a book from book creator on the ipad?

    I have created a book on the ipad using book creator.  I do not have an apple computer, I have only got the ipad.  I cannot email the book as it has too much memory.  I have exported it to itunes as pdf.  Can I get it printed in the apple store from

  • What are the steps to add a new MDEX host to an Endeca application ?

    Hi, I have setup endeca CAS, Workbench, ,Auth and Live MDEX all running in the same machine and everything works without any problem. Now I wanted to move the Live MDEX to a new host. I have installed MDEX, PS (as EAC-Agent), updated the LiveDgraphCl

  • Syncing Apps from iPhone 3 to iPhone 4

    I've just upgraded my phone 3 to 4 and managed to sync all my personal info apart from my purchased Apps. They no longer appear. How do I get them back??

  • Process System Not Responding

    I have Yoga 8. I was simply playing this game from Google Play, Fun Run when the battery died due to low power and then when i charged the tab and started it, it has been giving me the error "Sorry: Process System Not Responding". The tab keeps resta