Hide the window instead of closing

Hello!

I'm pretty new to flex development and currently trying to hide a window instead of close, in order to reopen more later (to keep all of the associated variables and components of the defined window).

I have experience of strange errors between systems.

Here's the situation:

I had a window:

(in file SearchWindow.mxml)

" < = xmlns:mx mx:Window ' http://www.Adobe.com/2006/MXML "
layout = "absolute".
Width = "300".
Height = "400".
systemChrome = "none".
minWidth = "300".
Visible = "false".
minHeight = "300".
horizontalScrollPolicy = "off".
verticalScrollPolicy = "off".
creationComplete = "init (); »
Closing = "Closing (Event)" "
title = "My Title" >

...

< / mx:Window >

The window itself is created as a variable private in the application mxml:

(in file MainApplication.mxml)

public var searchWindow: SearchWindow = new SearchWindow();

and once set (when the user logged), the closure of the login window

[...]

searchWindow.open (true);

searchWindow.nativeWindow.visible = false;    do not show again

[...]


and open when the user clicks the search button:

[...]

searchWindow.activate ();

searchWindow.orderToFront ();

[...]

(in file SearchWindow.mxml)

the closing event handler looks like this (and the part which, as it seems to me, does not work)

private void closing(event: Event): void {}
Event.stopImmediatePropagation;
event.stopPropagation ();
Event.preventDefault ();
save preferences
this.nativeWindow.visible = false;
var up: UserPreferences = Application.application.up;
up.downloadCenter_downloadPath = downloadPath.nativePath;
up.downloadCenter_width = nativeWindow.width;
up.downloadCenter_height = nativeWindow.height;
up.downloadCenter_x = nativeWindow.x;
up.downloadCenter_y = nativeWindow.y;
}

As I said, what I'm trying to do is to hide the window, not close. It works on most systems, like mine (Windows 7). But this doesn't seem to work on some systems (in detail on 1 Windows XP, Unix 2 and 1 Mac system).

What I am doing wrong? What is the correct way to achieve such a feature?

Thanks in advance for any help!

Hello

Add below eventListener in the creationComplete of your main application...

nativeWindow.addEventListener (Event.CLOSING, callClosing);

Note the above event is Event.CLOSING but not Event.CLOSE...

Event.CLOSING is called before that when the window is about to close... but Event.CLOSE is dispatcher just when he is about to close...

and your close function should now look like to... as below:

private void callClosing(event: Event): void {}
Event.stopImmediatePropagation;
event.stopPropagation ();
Event.preventDefault ();
save preferences
stage.nativeWindow.visible = false;
var up: UserPreferences = Application.application.up;
up.downloadCenter_downloadPath = downloadPath.nativePath;
up.downloadCenter_width = nativeWindow.width;
up.downloadCenter_height = nativeWindow.height;
up.downloadCenter_x = nativeWindow.x;
up.downloadCenter_y = nativeWindow.y;
}

If this post answers your question or assistance, please mark it as such.

Thank you

Jean Claude Chari

Tags: Flex

Similar Questions

  • (windows 7) Hide an icon on Hidden icons on the taskbar (hide the icon only, without closing the application.) [visible in the Task Manager is OK]

    can someone tell me how to remove the icons on the [hidden bar] in the taskbar? procedure or the application is OK. It should be revertable to normal. and it must be visible in the Task Manager. Here is a picture. some icon I want to disappear its icon is just utorrent.
    Windows 7.

    I tried to hide the windows more v5 application, but it does not satisfy me.
    I need to hide the icon on the [bar hidden system], but it must be visible on the [process] of [Task Manager] and it must be able to return - for me to show / hide if I want to.

    http://i1297.Photobucket.com/albums/ag35/Louis_Evangelista/1_zps7b7a47ed.jpg

    can someone tell me how to remove the icons on the [hidden bar] in the taskbar? procedure or the application is OK. It should be revertable to normal. and it must be visible in the Task Manager. Here is a picture. some icon I want to disappear its icon is just utorrent.
    Windows 7.

    I tried to hide the windows more v5 application, but it does not satisfy me.
    I need to hide the icon on the [bar hidden system], but it must be visible on the [process] of [Task Manager] and it must be able to return - for me to show / hide if I want to.

    http://i1297.Photobucket.com/albums/ag35/Louis_Evangelista/1_zps7b7a47ed.jpg

    I founded a response. . I used utorrent option/preferences/general boss key feature. and I just put the key to the combination and she responded to my needs.

  • How to hide the window of labview?

    Hello

    is there a way to hide the window of LabView showing 'First Steps' etc. for the duration of TestStand? I got an operator tries to close the window during tests with fatal consequences.

    Thank you

    Christian

    Hello

    What version of TestStand using LabVIEW 2010?

    Have you tried to change the adapter of LabVIEW to use RTE rather than the development system?

  • Everyone has a problem with the Windows Explorer permanently closing?

    * Original title: Windows Explorer

    Everyone knows about a problem with the Windows Explorer (not Internet Explorer) without interruption closing? It is not fair on 1 computer, I have 2 desktops and 2 laptops, and it does on 4 of them. They are all running Windows 7, (1 to the publishing house, 1A Ultimate and 2 Professional).  I can right click on something, even on the desktop, and most of the time, I get a message that Windows Explorer has stopped and the ability to close or wait for it to respond. I have normally not 30 minutes or more to wait so that he could respond and if I close it, then it does nothing. I've done all updates are recommended for all my computers, I did the defragmentation, disk check, etc and it still continues. I need help, please. I am so sick and tired of what I am about to go to a Mac and I don't like Mac computers, but said there is much less of a problem.

    You have loaded all 3rd party "Add-ons" in common to all PC? For example (this is an old post Vista but gives the general idea) - http://answers.microsoft.com/en-us/windows/forum/windows_vista-desktop/windows-explorer-crashes-on-right-click/719385e6-fff5-498d-807c-103bf0344f44?page=1&tm=1423414000974 and see Ramesh respond.

    If not, is there clues in the log of events (errors) in common on all computers where the crash?

  • Can I disable/hide the window animation of tilt brush?

    Adobe introduced the brush dynamics in CS5 and I'm fine with that. I'm not fine with is not able to hide this pop window which is supposed to help you know how the pen is positioned in space. It's boring. I want to hide, or at least to reduce its size. He takes takes too much place and I don't know if someone spends their time watching while drawing. I like the icon brush at the end and how it changes the angle-based form. It should be perhaps in feature request?

    If you point the mouse/pen on the top of the window, you can press the X to close the window, or go to view > view and uncheck the box overview of brush.

    You can also move the window or click the double arrow to make the window smaller.

  • How to hide the windows, and the Oracle Logo?

    I would like to hide Windows and the Oracle Logo in the window of the Oracle

    https://sites.Google.com/site/myoracleproblems/home/screen

    or move the higher demand. Does anyone know what to do, if anything?

    Thank you
    m.

    Hello

    I think that sooner or later you will need, you can not build up is an application of forms, reports and don't need menu.

    The only way you can play to hide this menu and it properly tested and works :)

    Kind regards

    Abdetu...

  • Hide the window menu

    Hi all

    I wonder if it is possible to hide the standard ' window' in my 'MDI window' menu such that appears in the picture as an attachment below... and it's better if you can hide the bar now this menu :D

    Please, take a look at what I wanted to hide, click here


    Thanks in advance,
    Damien

    Pls change change Magic Item = window

  • Hide the window title.

    Hi all


    Can hide the title bar of a form? I use Forms 6i.


    Thank you and best regards,

    Manu.

    Hi Magoo,

    I don't think its possible. In versions of the client-server forms does not have management window on its own, but allows the "window manager" to, which is windows itself (running on windows). And a standard window in a windows application also has a title bar.

  • Why hide the menu bar hide the window title?

    [FF4.0] if I uncheck the (upper area of the R click) menu bar the title in the title at the top of the window bar also disappears. IE9 doesn't have a title bar empty! What is with the loss of the title bar? It is really useful...

    Take a look at this extension,

    https://addons.Mozilla.org/en-us/Firefox/addon/Aero-window-title/

  • Turning off Auto hide the Windows taskbar?

    My taskbar will appear on the bottom of the screen when I first connect, but it goes away after a while. My husband locked the taskbar, but nothing changed so I just opened and disconnected and still no change it always disappears. Please help fix, I am not a wiz kid computer.

    It disappears little matter that the engine of research because I usually use firefox!

    Try this.

    Click an empty spot in your taskbar with the right button > click Properties > tab taskbar, uncheck the auto-hide the taskbar

    HTH

    If I brought you joy, vote! If I answered your question, click, propose as answer! > WT

  • By clicking on the images seems to force trying to open them in the window instead of what they are coded to do.

    At least, I think that this is the case.

    I'm having a problem where if I click on an image which, say, opens on the site Web and widens, it will rather force it to open only in a new tab. He in turn usually always kills the history of the page where you were just in too, so if you click on 'back' (in my case, in general, the same back button does not work, its greyed out so I have to re - search history manually.) it will send you back to the page where you first started.

    And also one more question if it's normal, for a reason for Windows 7 'open with' the function absolutely refuse to read Firefox. If I'm going to go to try to open something with FF, click on the .exe and select, it will not even appear in the box of your choice.
    It however allows me to drag and drop them in the browser, and I was able to do it with a Pale Moon plant.

    I tried without the add-on, and the problem persists. I think it might be a problem of profiles as Pale Moon had no problem until I installed mine. If there is something that anyone might know which will be not involved to redo my complete profile... once again, I'm all ears.

    Sorry, I did further tests when I had the time. It turns out that Download Statusbar (S3) is the issue.

  • I want the text to stretch all the way across the window instead of centered, with a lot of unused space on the left and right sides.

    It is only using about 50% of the screen. The 25% of the left side and 25% on the right side are just empty space. I want the content of the page to extend over the entire window.

    You can use an extension to set a page zoom and the size of the default font on the web pages.

  • How to hide the window "current calls.

    Whenever I reduce Skype, I have this next window and cannot be removed. How can I remove it?

    [Sorry guys. No screeenshot. I cannot download to my computer, can't paste a link of Dropbox, or cloud - he still directs to a web page that is broken, even when I remove the http://]

    Go to preferences-> calls and uncheck ' Show current calls when Skype is in the background "to turn it off.

  • Windows media player - "you want to hide the drive.

    Hello

    Can someone help me with something that leads me into the wall? Since I installed SP2 on my desktop and laptop, when I close WMP everything a video or track is playing, a dialog box appears on the screen asking me "Do you want to hide the drive instead to shut up?". There are two button (Yes & No.), and a checkbox to say '' do not ask that in the future".

    More often than otherwise, this dialog box appears mainly outside the screen area, and I have to drag in the main window. But more annoying than anything else, is that no matter if I check the box "don't ask again", I'm ignored. Whenever I close the player with the closing this window 'X', I get the same dialog box.

    It was not the case prior to SP2. I looked all over the internet by using the text of the dialog box to see if other users know this, and I can't find a thing. I am logged in as administrator (the only user on both machines). I am running Vista 32-bit, l i've got things like FFShow installed and the combined community codec pack. However, my brother also has it installed on his vista machine and did not see the dialog box.

    Is there some sort of registry setting that is corrupt, is not being written because of UAC, or something (anything!) that I can put to stop this dialog once for all to come?

    Much recognition for everyone and anyone who can help you.

    Am I just that you said this happens on both machines? Must be something in common.

    You can post the pieces of the error of the newspaper here, we can repeat sections post so that each section of the error
    It's different. Usually 10 or if the lines to a section with errors.

    What are the antivirus/antispyware/security products on the computer and that have ALREADY been on it even if
    you have uninstalled them?  (Exeunt the remains around strange questions that cause.)

    ----------------------------------------------------------------------

    Turn off UAC to see if he has not a part:

    You can also enable the UAC SILENCER or STOP if it lowers you the level of security.

    THIS UTILITY MAKES IT EASY TO
    http://www.tweak-UAC.com/
    Tweak UAC utility - easily put UAC into Silent Mode or POWER

    =======================================

    Also try these:

    1 try to run the checkdisk - calendar that it runs at the next startup, then apply OK then restart your way.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    If no joy:

    Try the Startup Repair tool-

    This tells you how to access the System Recovery Options
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    Try recovery options Startup Repair

    How to do a startup repair
    http://www.Vistax64.com/tutorials/91467-startup-repair.html

    Rob - bicycle - Mark Twain said it is good.

  • Is there a way to hide the menu in windowed mode VMware Workstation 8 bar?

    While in windowed mode is there a way to hide the menu bar on a crowd of Win7?  This menu bar is absolutely huge (about 2 x as large as it should be!) so I was wondering if it was possible to get rid of it?  I know it was possible in older versions, because I found some guides on how to do it.  These guides apply to Workstation 8.  I don't want to use the unit because it's too hard to keep the instances of BONE separate and organized in a meaningful way.

    If any VMware staff are reading this, I would recommend that VMware uses a menu bar of title as Firefox 8 on Windows 7.  With the little drop down menu built into the title bar of the window instead of a space hogging the menu bar stretched all the way in all top of the window.  Or at least implement a combination of keys in option show/hide the menu bar. Please?

    See if this thread helps you not at all:

    http://communities.VMware.com/thread/329429

Maybe you are looking for

  • Sounds and breaks Internet connection goes haywire

    From time to time my new TouchSmart desktop PC disconnects from the Internet, and then the sound goes haywire. I do the troubleshooting and fix the connection, but the sound continues to ruin (music, video, etc.) and then after a little while the Int

  • straingage

    Is it possible to measure the Wheatstone 350 Ohm bridge (cell) using PCIe-6341 with SCB-68 is?  Can I use the digital + 5V for high voltage of excitation and digital terrain for low voltage?  Then I will use 2 analog inputs, measure the Vo and the ot

  • Updates from Windows to restart loop ;-(

    My HP Pavilion Desktop under Vista Home Premium (German language and SP1) with intel processor through the normal automatic updates at around 03:00 local time without any apparent problem.However, the virtually identical machine next to him is now ta

  • 0 x 80040154 - when you try to run programs from Microsoft fix it Center

    I get this error code when trying to run programs from Microsoft Fit computer Centre - 0 x 80040154... Help

  • Media Center cannot detect the CBS signal

    When I connect my antenna directly to the TV, I pick up CBS (channel 19-1) live without any problems, but no matter what I do or I place the antenna, when I connect the antenna to my dvr PC, Windows Media Center does not detect any signal of CBS and