2 Replies Latest reply on Aug 29, 2008 3:16 PM by Mostafa_Farghaly

    task bar height ?????????

      Hello world ,
      iam developing AIR/Ajax application and i want to know the height of Taskbar to alert the user with specific events like MSN messenger user login alerts , and suggestions , solutions ?
        • 1. Re: task bar height ?????????
          Joe ... Ward Level 4
          You can't get the height directly, but the Screen class will give you two rectangles, one representing the entire screen, the other representing the "visible" or usable area -- which is the entire screen minus the taskbar (or dock on the Mac). Now the taskbar isn't always at the bottom of the screen, so you might have to make some educated guesses based on the difference between the screen bounds and the visible bounds.

          If you just wanted to set your alert at the bottom of the screen, but not under the task bar, you could do something like this:
          window.y = Screen.visibleBounds.height - window.nativeWindow.height;
          • 2. Re: task bar height ?????????
            Mostafa_Farghaly Level 1
            thank you Joe ... Ward
            your solution did not work with me , but i have solve the proplem
            //maximize the window
            // the screen Height - maximized window height == acurate taskbar height :)
            var taskbarHeight = air.Capabilities.screenResolutionY - nativeWindow.height;

            the window that test this heigt is invisible , and then write the result in EncryptedLocalStore to use it later , so donot calculate it again :) , if any one have better solution