1 Reply Latest reply on Oct 28, 2009 9:58 PM by Joe ... Ward

    How I can create NativeWindow without focus

    Black Stork KCO

      I need to create nativeWindow "always in front", but withou focus. I want to create notification window.

      I am using this code:

       

      function createNotificationWindow(message){
          var winHeight = 200;
          var winWidth = 200;
          var options = new air.NativeWindowInitOptions();
          if (!message)
              message = '';
          options.systemChrome = air.NativeWindowSystemChrome.NONE;
          options.maximizable = false;
          options.resizable = false;
          options.transparent = true;
          var content = air.File.applicationDirectory.resolvePath('notification.html?message=' + message);
          var notifWin = air.HTMLLoader.createRootWindow(true, options);
         
          notifWin.stage.nativeWindow.minSize = new air.Point(winWidth, winHeight);
          notifWin.stage.nativeWindow.maxSize = new air.Point(winWidth, winHeight);
          notifWin.stage.nativeWindow.x = (air.Capabilities.screenResolutionX - winWidth);
          notifWin.stage.nativeWindow.y = (air.Capabilities.screenResolutionY - winHeight);
          notifWin.load(new air.URLRequest(content.url));
      };

       

      but the window gets focus