Disable the main window close

I have developed an AIR application and this is my goal, I don't want users able to close the main window. I tried to disable the close button but I thing that it is not possible. I would like to find a way to control which can be to trap the window closing event.

Kind regards

You can listen to the event Event.CLOSING and preventDefault on it, for example:

http://ns.Adobe.com/MXML/2009.

xmlns:s = "library://ns.adobe.com/flex/spark".

creationComplete = "init ()" > "

private function init (): void {}

addEventListener (Event.CLOSING, cancelClose);

}

private void cancelClose(e:Event):void {}

If (! allowClose.selected)

e.preventDefault)

}

]]>

Tags: Flex

Similar Questions

  • Close, minimize and resize buttons are inactive on the main window

    My email client is the beta version of 41. I just upgraded the sys op to version 10 of Windows version 7.

    The close, minimize and resize buttons are inactive on the Thunderbird main window when running on Windows version 10. These buttons are active on other windows such as the address book and new message. Ctrl W keys work on the main as Alt and then exit.

    Is there a reason that the buttons are inactive on the main window?

    https://support.Mozilla.org/questions/1082823

  • iOS 9.3.1 Mail App crashing on the main window - a SOLUTION. Can be linked to rogue/spam email

    I had a problem with Mail crashing several times today and was close to restore my phone but am happy that I stumbled upon a solution until I did it!

    I'll copy / paste of the other post I made on the discussion board:

    I had a problem this morning with the Mail App unexpectedly crashing when opening on my 5s iPhone running iOS 9.3.1 (last updated).

    In case someone knows something similar, I found a solution that was remarkably easy.

    Trying to open a mail, the app would show the display of messages for a fraction of a second, and then the crash. Nothing worked - quit smoking and a retry of the app, reboot / hard re-boot of the iPhone, leave all specific applications, disabling of e-mail accounts, settings etc.. I was beginning to think that I have to do a hard system restore, but thank God I have not, as it is a major PITA and I found the unexpected solution.

    In any case, I noticed that I could get in Mail by opening one of my emails from the Notification screen. Everything seemed fine, but if I close this message to return to the main window of Mail, the application crashed once more. The main window is appeared to be the culprit. I noticed that several new Spam messages were visible on this screen this morning.

    So here's how I found the solution: my computer, I myself sent a priority email, which came on my screen of notifications. By using this link directly to open the message, Mail worked fine again. Then by using the arrows to zip directly from a message to a message, I worked my way through the new emails, including the unrecognized Spam I deleted. Once they were gone, I back-arrow in the main screen of Mail and Voila! No more crash.

    So, apparently, there are messages that can crash the Mail app on iOS 9 simply by being visible in the main window. Be aware of this and if this happens to you, with Mail blocks instantly whenever you open it, try this approach before restoring your system software.

    You could also try resetting your e-mail account. First close your Mail application completely from the window of the selector app by double clicking the Home button and drag the email preview pane up until it disappears from the display. You may need to search the mail pane covering scribbles to the left. Then go to settings > Mail, Contacts, calendar > find your e-mail provider and click on the account. On the next page, delete the account. Then perform a forced reboot. Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. Then go to settings > mail... and to add the account.

  • Write the window covered by the main window of TB on Mac

    I am a novice Mac user, so maybe this isn't a matter of TB, but I hope that others have understood how address. When I click on write to compose a new message, the new message composition window opens and everything seems normal. If however, I need to return to the main window of the TB, the window of writing (new message composition) withdraws in the background (as it should). When I try to return to the window of writing, I can either reduce or close the main window of TB to search entry window. The command - Tab key sequence shows icon of 1 TB, which is the main window. In Windows, the writing and the main window of TB show in the Alt - Tab sequence with each window having the same ability to manage. Is there an easier way to navigate back from writing to the main window without having to close or minimize Windows on the MAC?

    If you click on Cmd-' on the keyboard, you should be able to switch the focus to the window with any application that uses several windows.

  • Disappears from the main window of the activity monitor

    I'm under El Capitan 10.11.5, 15F34 build on an iMac (retina, 5K, 27 inch, mid-2015). If I open the activity monitor, I get the CPU usage, but the main window will briefly appear and disappear. If I minimize and restore, I also get it for a fraction of a second and then it seems to fall back on the dock. The history of CPU option (cmd 3) is grayed out, although I can get it as the icon in the dock.

    My question, then, is what caused this problem and how to restore to normal activity monitor?

    Please read this message before doing anything.

    This procedure is a test, not a solution. Don't be disappointed when you find that nothing has changed after you complete it.

    Step 1

    The goal of this step is to determine if the problem is localized to your user account.

    Select the feedback connections* and log in as a guest. Do not use the Safari connection only 'user comments' created by 'find my Mac '.

    While signed in as a guest, you will have access to your documents or settings. Applications will behave as if you use them for the first time. Do not be alarmed by this behavior; It's normal. If you need any password or other personal information in order to complete the test, save, print, or write them before you start.

    Test while signed in as a guest. Same problem?

    After testing, log on to the guest account and in your own account, disable it if you wish. The files that you created in the guest account will be automatically deleted when you log out of it.

    * Note: If you have enabled 'find my Mac' or FileVault, then you cannot activate the guest account. The login 'User comments' created by 'Find my Mac' is not the same. Create a new account to test and delete it, including his home folder, after testing.

    Step 2

    The goal of this step is to determine if the problem is caused by changes in the system of third party that load automatically at startup or logon, by a device, by a police conflict or corruption of system files or some system caches.

    Please take this step regardless of the results of step 1.

    Disconnect all devices wired except those required to test and remove all the expansion cards from secondary market, as appropriate. Start in safe mode and log on to the account of the problem.

    Note: If FileVault is enabled in OS X 10.9 or an earlier version, or if a firmware password is defined, or if the boot volume is a software RAID, you can not do this. Ask for additional instructions.

    Safe mode is much slower to boot and run as normal, with limited graphics performance, and some things work at all, including an audio output and a Wi - Fi connection on some models. The next normal boot can also be a bit slow.

    The login screen is displayed even if you normally connect automatically. You need your password to log on. If you have forgotten the password, you will have to reset it before you begin.

    Test in safe mode. Same problem?

    After testing, restart as usual (not in safe mode) and make sure you always have the problem. View the results of steps 1 and 2.

  • Error - in Windows XP the external monitor laptop becomes primary, but Explorer windows do not go to the main window.

    Original title: xp laptop lidswitch and extended mode.

    I have xp laptop. I connect external monitor and set it to the extended mode with my laptop LFP as main and external monitor as secondary. Configuration of the power for the closure of the cover option as long as "do nothing".  Open an Explorer window and drag extended display. Then close the cover. The external monitor becomes primary, but the Explorer windows do not go to the main window. They are always extend on even though the extended mode is it more. Is this a known problem with XP? Anyone know? Thanks for your help...

    Hi jt_pan,

    Try to share the desktop on two monitors.

    For more information, refer to this link: How to configure and use multiple monitors in Windows XP?

    Hope the helps of information.
    Please post back and we do know.

  • I get a blue screen in the main window to develop the module

    I just downloaded LR6 from CC Adobe on my new computer laptop > it worked fine on the old laptop, but now I have a problem. I imported the photos that look very well, but when I try to open on (one) in the develop module I get a blue screen in the main window.  The image appears in the navigator Panel. I use Windows 10, which I never used before LR.

    Lightroom preferences-> Performance tab, disable the GPU option. It may be necessary to restart Lightroom.

  • Shortcut Ctrl C does not work in the main window of Firefox

    I use Firefox version 38.0.5, Windows 7
    Since the update Ctrl + C shortcut does not work in the main window of Firefox. (I can't copy text from any website using Ctrl + C).

    Click right and using the copy in the menu works perfectly. CTRL V and Ctrl X work fine without problem.

    Ctrl C works fine when copying text from the address bar and search bar, I just can't copy anything from anything in the main window of firefox.
    

    I tried to run Firefox in safe mode, I have also reset firefox and a virus scanner, but nothing has solved the problem.

    If anyone has any suggestions, that would be great. Thank you

    See:

    • bug 1173979 - copy Ctrl + C is broken in the last Irish FF 38.0.5

    Please, do not comment in bug reports
    https://Bugzilla.Mozilla.org/page.cgi?id=etiquette.html

  • FF31: When I only have a tab open, even empty and close the tab window closes.

    FF31: When I only have a tab open, even empty and close the tab window closes.

    Type of topic: config in the address bar and press enter.
    Accept the warning.

    browser.tabs.closeWindowWithLastTab

    Double click to switch to false and then restart Firefox.

    Now, if you close the last tab of that window (or Firefox) does not close, but a new tab will be there.

  • new links will be open in a tab, only in the main window

    with firefox 21, links will not open a new tab, only in the main window. I put the option of opening tab, but it still does not work

    The setting in Firefox/tools > Options > tabs: "new pages should be opened in ': 'a new tab/window' is for links that specify a target window to open the link.

    This option allows to divert these links into a new tab instead of a new window.

    Links that do not specify a target will open in the current tab if it does not change JavaScript.

    If this is not the case then you can have an extension interfere.

    For links that do not specify a target, use a middle click or hold down the Ctrl key and click the link or use the context menu to open the link in a new tab or window.

    This applies to the bookmarks and other links so that you can click the view Image in the context menu of an image or click on the address bar to get a new tab with this link, the Reload button.

    Click on a JavaScript link to avoid having a blank tab.

  • When I click on a bookmark, it opens in the bookmark sidebar, not in the main window.

    I want a selected bookmark to open in the main window when I click on it (as it has always done before)

    Bookmarks that open in the sidebar is the default value for the bookmarks created via a link or a button on a Web site to add a bookmark for this site.

    • Check the properties of a bookmark using the context menu in the side bar (Ctrl + B; Cmd + B on Mac).
    • In the Bookmark Manager (Bookmarks > show all bookmarks) you can click on the button more in the lower details pane on the right.
    • To ensure that "Load this bookmark in the sidebar" is not selected (uncheck it).
  • Windows appear on the taskbar, but won't focus, other 3 goes, only 1 that seems to be the main window is not found

    Windows appear on the taskbar, but won't focus, other 3 goes, only 1 that seems to be the main window is not found

    ALT + tab select window; ALT + SPACEBAR; maximize; sigh

  • How can I move the tabs back above the main window and below the bar "awesome"?

    I would go back to the previous version of Firefox. I want my tabs immediately above the main window, below the URL bar, and I do no like the "Save password" option appearing in the reading area.

    You are welcome. Other users can view this message in the future for any reference, please click RESOLVED.

  • How can I check my window of downloads as a tab in the main window

    How can I check my window of downloads as a tab in the main window

    This has happened

    Each time Firefox opened

    https://addons.Mozilla.org/en-us/Firefox/addon/256/

  • Portege R700 - fonts in the main window of AuthenTec Truesuite changed

    Hello

    I installed on my Toshiba Portege R700 AuthenTec Truesuite version 3.0.1.149. After two days of good performance the police in the main window changed, becoming impossible to read. No doubt, I have change some settings in Windows and, also, this font has changed because of course I change anything in your application. Bearing in mind that my OS is Windows XP Professional SP3, pelse be so kind and help me with a solution to return to standard fonts.
    I uninstalled applications records, cleaned, reinstalled software package downloaded from the Toshiba site, request

    Thank you

    Best regards

    Cristian

    Can send you a link where you can see the screenshot?
    I mean for a better understanding.

Maybe you are looking for