Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7573723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:15:17+00:00 2026-05-30T16:15:17+00:00

When working with NativeWindow ‘s in AIR, can you get an event everytime the

  • 0

When working with NativeWindow‘s in AIR, can you get an event everytime the window is minimized / unminimized? I tried hooking up with DisplayStateChanged but its not firing when the window is minimized. Do you know how to get such an event?

I’m on Windows 7, 32-bit, and I’m running AIR 3.5.

This is the init code:

        var init:NativeWindowInitOptions = new NativeWindowInitOptions();
        init.maximizable = true;
        init.resizable = true;
        init.type = NativeWindowType.NORMAL;
        init.minimizable = true;
        window = new NativeWindow(init);
        window.alwaysInFront = true;
        window.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, dispChange, false, 0, true);

And this is the handler:

    private function dispChange(e:NativeWindowDisplayStateEvent):void {


        // if minimized / un-minimized
        if (e.beforeDisplayState == NativeWindowDisplayState.NORMAL && e.afterDisplayState == NativeWindowDisplayState.MINIMIZED) {
            trace("MINIMIZED!");

        }else if (e.beforeDisplayState == NativeWindowDisplayState.MINIMIZED && e.afterDisplayState == NativeWindowDisplayState.NORMAL) {
            trace("Un-MINIMIZED!");

        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:15:18+00:00Added an answer on May 30, 2026 at 4:15 pm

    The closest thing I could get to a minimized event was the activate events. Whenever the user clicks outside the app, that window gets deactivated. You can then minimize the window automatically using minimize(). But the deactivated event is also called when the user minimizes the window / switches to another. And when the user switches back you get a call to activate.

    window.addEventListener(Event.ACTIVATE, dispActive, false, 0, true);
    window.addEventListener(Event.DEACTIVATE, dispDective, false, 0, true);
    
    private function dispActive(e:Event):void {
        // un-minimized
    }
    private function dispDective(e:Event):void {
        // deactivated .. minimize again to be sure
        window.minimize();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on my first Android app here. I've searched and tried everything I can
I am working on a full screen kiosk application in Flex 4/Air 2 using
Working on an image gallery, but it keeps crashing on me (you control it
I'm working on a simple flex / AIR application with just a mx.TextInput control
Working with COM interop, I can call a managed function from within unmanaged code.
The customer I am working for wants to display popup in an AIR application
Working with an API that can handle multiple connections (i.e. sessions), each of these
Working on THIS Page: newsite.702wedding.com/live/ Can't find where to remove the arrows at the
Working example: http://alpha.jsfiddle.net/gTpWv/ Both of the methods work separately, but once regexp for smilies
Working with Json, how can I NSlog only the title in this code: NSDictionary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.