How do I make a form close when the little X in the corner is pressed???

This is probably something really basic, but for the life of me I can't remember.
Thanks in advance.

How I did it (if I remember correctly):
Form level triggers:
WHEN-NEW-FORM-INSTANCE
:global.quit_all := 'N';
KEY-EXIT
IF :System.Event_Window = 'FORMS_MDI_WINDOW' then
:global.quit_all := 'Y';
END IF;
exit_form;
WHEN-WINDOW-ACTIVATED
IF :global.quit_all = 'Y' THEN
exit_form;
END IF;
Extra trigger for "inner X":
WHEN-WINDOW-CLOSED
IF :system.mode = 'ENTER-QUERY' THEN
do_key( 'EXIT_FORM' );
END IF;
do_key( 'EXIT_FORM' );

Similar Messages

  • How to preven JButton of generated actions when the user keep pressing down

    How to preven JButton of generated actions when the user keep pressing down the key or the short cut
    The code below to show the issue when the user keep pressing Alt+ O
    We want to prevent the JButton from generating multi actions just one action only
    A sample of code shows the behaviour which has to be prevented. Continue pressing "Alt +O" and you will see the standard ouptput will print time stamps
    Please notice, I am NOT interested in Mouse press which has a solution by adding a threshold ( setMultiClickThreshhold(long threshhold) on the JButton  as an attribute.
    public class TestPanel extends JPanel
       private JButton btn;
       public TestPanel()
          btn = new JButton("Open");
          this.add(btn);
          registerCommand(new MyAction(), InputEvent.ALT_MASK,
                KeyEvent.VK_O, btn, btn.getText(), 0);
       public static void registerCommand(AbstractAction action,
             int mask,
             int shortCommand,
             JComponent component,
             String actionName,
             int mnemonicIndex)
          InputMap inputMap = component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
          KeyStroke knappKombination = KeyStroke.getKeyStroke(shortCommand, mask);
          if ((component instanceof AbstractButton)
                && mnemonicIndex >= 0
                && mnemonicIndex < actionName.length()
                && (shortCommand >= KeyEvent.VK_A && shortCommand <= KeyEvent.VK_Z))
             ((AbstractButton) component).setDisplayedMnemonicIndex(mnemonicIndex);
          if (inputMap != null)
             ActionMap actionMap = component.getActionMap();
             inputMap.put(knappKombination, actionName);
             if (actionMap != null)
                actionMap.put(actionName, action);
       public static class MyAction extends AbstractAction
          private static final long serialVersionUID = 1L;
          @Override
          public void actionPerformed(ActionEvent e)
             System.out.println(System.currentTimeMillis());
       public static void main(String... args)
          SwingUtilities.invokeLater(new Runnable()
             public void run()
                JFrame frame = new JFrame("Testing");
                JPanel panel = new TestPanel();
                frame.getContentPane().add(panel);
                frame.setPreferredSize(new Dimension(500, 500));
                frame.setMinimumSize(new Dimension(500, 500));
                frame.pack();
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setVisible(true);
    }Edited by: user12130673 on 2013-feb-13 03:01

    Use KeyStroke getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease) with onKeyRelease=true instead?

  • Flash 8 - How do i make a sound occur when the car hits the item

    In the car game i am working on, I now got a point system set up so the car hits different
    items and the points rise but i want the sound clip i have downloaded to play when the car hits
    the items..
    http://thebackyardchampion.deviantart.com/#/d48zgkl - Game link so far - but not published the point system yet.
    Anyway Please don't provide to straght forward advice such as "copy this code (code here)" etc
    Please can you provide the code i need, the MC car is called 'car 1', the MC items have different names
    such as g1, t1, pt1, pb1 and shine.
    Please tell me where i need to place the soundwave in the firstplace (or leave it in the library.)
    Whether i need to click the car or the item and paste it in frame 1 etc?
    Over all, all layers have a total of 3 frames. 1 key frame i believe and the other two are normal frames.
    Please helps..

    Hi there
    Probably it's just a matter of associating the correct CSS file.
    Open both topics in RoboHelp.
    Edit a topic where things look correct.
    Click the CSS icon as shown below:
    Click the image below for larger view
    Now edit the errant topic.
    Click the same icon and choose the CSS file you saw earlier.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How can I make a JButton enabled when the user types smthg in a JTextField?

    Hello,
    I have a JButton and a JTextField on a frame. The JButton is disabled, myButton.setEnabled(false).
    How can I enable the button when the user types something in the text field? Just typing, not pressing enter.
    Thank you

    There isn't one, actually. What you need is a DocumentListener and you have to associate it with the document object associated with the field i.e.
    field2.getDocument().addDocumentListener() (new DocumentListener() {
    });

  • How do I make a brush signature when the tool bar is missing the magic wand tool?

    I am missing the magic wand tool from the tool bar on the left of cc.  How do I retrieve it or is it completely missing from the photoshop cc download?  I need it to make a brush signature for signing photos.

    Hi,
    Most likely the magic wand tool is not missing.
    The Magic Wand Tool is grouped with the Quick Selection Tool in the tool box
    more info on where the tools are and how to access them
    https://helpx.adobe.com/photoshop/using/tools.html
    https://helpx.adobe.com/photoshop/using/using-tools.html

  • How can you make your Facetime work when the error message comes up saying, "The server encountered an error processing registration. Please try again later." I am using the Facetime app on my MacBook Pro 13" Inch

    Please answer my question quickly!!!

    Hey radyslav,
    There's an article that applies to your situation, I'd follow the steps within here:
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Take care,
    Delgadoh

  • How can I make it so that when Safari opens it takes me to the homepage?

    Say I am on youtube and I quit safari, when I reopen safari later, it goes to the page last open, in this case, youtube. How can I make it so that when Safari opens it always takes me to the homepage?

    Click on the red button (top left) to close the window before quitting.

  • When i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?

    when i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?

    Unfortunately, the recording & movie industry does not respect the rights of the people who make them money, and thus you can only use the paid-for content in ways they see fit. Even if I lived in a bunker where no one else could possibly see the movie I paid for, therefor I'm not 'sharing it illegally', I would still not be allowed in a blue moon to copy that movie to DVD for TV viewing. Someone will tell you to get an AppleTV. How about Apple give us one for free? Until this changes, people wanting to use their content in multiple locations will continue to download music & movies via torrents, legally or illegally.

  • When I am connected to my home wifi, it says I am connected but the 4G icon doesn't go away.  How can I make that go away when I am connected?

    When I am connected to my home wifi, it says I am connected but the 4G icon doesn't go away.  How can I make that go away when I am connected?

    When I'm at my home, and on my Wifi, my 4G icon on my LG G2 is still present. No big deal. If the bits can flow via WiFi, that's what they'll do.
    You might try (if you really MUST shut off the cellular radio):
    Settings, Network Connections and More networks. Select Mobile Networks and uncheck Mobile data and data roaming.
    Not sure if that will work - but give it a try.

  • How can I make a form show complex composite data?

    How can I make a form show complex composite data?
    We would like a form to display the following information:
    Employee Names as the columns, 1 row for each calendar day, and each item in the block containing the total sales amount (and other information) for that employee for that day.
    This would require the block to function as a (composite) crosstab report.
    Here is an example:
    We have employees: Jane, John, Jim, and Janice
    We would like to see their total sales for the following days: 5/1 .. 5/5
    Jane John Jim Janice
    5/1 50 8 10 3 30 5 20 7
    5/2 40 7 60 8 10 2 30 4
    5/3 20 3 50 8 70 9 50 9
    5/4 51 8 40 7 40 8 50 8
    5/5 10 1 20 2 90 10 10 2
    We have a table with records of each day, for each employee, and their sales for that day.
    There is a possibility our list of employees can change as well as the number of days.
    Anyone tried doing anything like this with a form? We don't want to just embed a report because we would like to include other data as well besides what is mentioned above and we would like them to be able to change some of that data. Thanks in advance for any help.
    null

    I have a VERY similar problem where I want to have this matrix on the form with six days worth of data (three columns for each day) for my data table. I have done as Momen has suggested and created a view (using SQLPLUS):
    create table weekdays (weekday varchar2(3), date_x date);
    drop view employee_absences_v;
    create view employee_absences_v as
    select weekday,
    absence_date,
    hours,
    absence_code_lvid,
    adjustment_status_lvid
    from employee_absences ea, weekdays wd;
    that hopefully provides a row for each day of the week for my data table. The view is created OK but I'm not sure how to get it into the form properly. Also, I am using the form to CREATE rows in the data table not just SELECT and DISPLAY and there may or may not be a row of data for a corresponding day which is going to be a problem for me using this view method, I think. Let me know how this goes and if you get your form to work and how? Momen, your method appeals to me but it's not 100% clear how to get it to work in a form?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Tina Radosta ():
    We tried to create the view (not with Designer because we don't have that). We were not successful in creating a view with a matrix. We would greatly appreciate your help.
    Thanks in advance,
    Tina<HR></BLOCKQUOTE>
    null

  • How can I make my form be a certified document?

    Hi all,
    In my form, I want to export xml by using the script "Reference_Syntax.exportData( [ STRING param1 [, BOOLEAN param2 ] ])",
    for example, xfa.host.exportData("filename.xml",0).
    However, it is invalid. 
    It says that "This parameter1 is only valid on certified documents where the user has sufficient
    permissions".
    But how can I make my form be a certified document, or how can I get the sufficient permissions?
    Script "xfa.host.exportData("",0)" can be valid, but what I need is specifying the location and file name so that users can export xml just by clicking the button.
    Can I achieve this function?
    Waiting for your reply, thanks a lot!
    Ellie

    Please take a look at this discussion. Also, are your end users using Adobe Reader? If so, your document must be Reader Enabled withed LiveCycle RE to use the import / export xml functionality.

  • In windows 7, how do I make firefox start automatically when I turn on the pc.?

    In windows 7, how do I make firefox start automatically when I turn on the pc

    That worked, thanks. When I turn on the pc, I almost always go to the internet before anything else, so this eliminates one step. It doesn't seem to save any time, however, but it is easy. If anyone else wants to try this, it looks like it's very easy to undo if you change your mind.

  • How would I make it so that when "deleting" an image I can make it so that the delete key does it or a button I put on the application?

    How would I make it so that when "deleting" an image I can make it so that the delete key does it or a button I put on the application?
    I want it so that I can use either a button on the designer window or the delete key. I know how to do the or part but the trouble I'm having is coding the button in.
    if (LastImageClicked != null && (e.Key == Key.Delete || Button))
    This is the code that I have in the format I'm looking for I just don't know how to do it. Thanks for your help!

    There are a number of things which are unclear about your question.
    I'll tell you one way to approach this though.
    Handle Window.PreviewKeyDown.
    <Window
    Window.PreviewKeyDown="Mainwindow_PreviewKeyDown"
    Code behind
    private void Mainwindow_PreviewKeyDown(object sender, KeyEventArgs e)
    if (e.Key == Key.Delete)
    File.Delete("p001.jpg");
    I don't know enough about what you mean by LastImageClicked  but you need some way of knowing which path you are going to delete.
    Then you might well have a problem if it's showing in an image control.
    You will need to copy the picture off disk into a new bitmapimage object.
    If you just do
    <Image Source="p001.jpg"
    Then that image will grab the file and you won't be able to delete it - you'll  get an error.
    In my experimental code p001.jpg is set as content copy always so it ends up next to the exe in the bin when the solution compiles.
    You would probably want a full path to a file there.
    Hope that helps.
    Recent Technet articles:
    Property List Editing;  
    Dynamic XAML

  • Nested Skip Logic: How do I create a form where when a top-level option has changed, that its related sub-fields will retract (disappear)?

    How do I create a form where when a top-level option has changed, that its related sub-fields will retract (disappear)?
    (This question was asked also in 2012 and 2013, but no answer has been provided.)
    THANKS
    Deborah

    Hi qwerty,
    Dun tink that creative customer support sucks cos I had been dealing with them in the past and I can say that their service are quite gd and fast. If you wanted a refund, I tink you need to contact the store that sells you the product. Dun tink creative will refund you though.

  • How do I make objects fade in when scrolling?

    How do I make objects fade in when scrolling? Thanks!

    Do you know of a way to make Edge animations play when scrolled into view on a Muse website?
    Apple does this well here: http://www.apple.com/ios/ios7/features/

Maybe you are looking for

  • Can't load files into Library

    I recently purchased an iPod and dl'd and installed iTunes. But when I tried to add my music folder into iTunes library, it runs an error message and auto closes. Here's what's happening: 1. It opens that Adding Files dialog box and starts processing

  • Question about some statement

    Hello Gurus,        as for a statement "The MBW job BI_BTCH__FX_PAYMENT_DATA=X10M and itu2019s child job ended with completed Abnormally status.", I have some question as follows:      (1) where does they check out this job " BI_BTCH__FX_PAYMENT_DATA

  • Pivot Static Columns for Group by Rows

    I have some commonly alike problem but its different from dynamic pivot unpivot Input Table ID Value Guid1 Val1 Guid1 Val2 Guid1 Val3 Guid1 val4 Guid2 asd Guid2 asd Guid2 asd Guid3 test Guid4 Lee Guid4 Jack Guid4 Arnol Guid4 wan Guid4 Swin Output Tab

  • [svn:osmf:] 17638: To fix FM-1040, we came up with a solution as depicted by SVN change number 17636.

    Revision: 17638 Revision: 17638 Author:   [email protected] Date:     2010-09-09 16:34:17 -0700 (Thu, 09 Sep 2010) Log Message: To fix FM-1040, we came up with a solution as depicted by SVN change number 17636. However we are not totally satisfied be

  • Error: 0 communication IDoc(s) generated for message type

    what is this??..wher i need to screw this error.