Height of system tray?

How can I get the height of the system tray or how can I get the height of the display area, excluding the system tray?
I am using wxPython 2.8 with Python 2.6 on two different platforms: Windows Vista and Windows 7.

Virgil Stokes wrote:

How can I get the height of the system tray or how can I get the height of the
display area, excluding the system tray?

Are you assuming single monitor systems? You can find the location of
the tray using:
    import win32gui
    win32gui.GetWindowRect(win32gui.FindWindow('Shell_TrayWnd',''))

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Hi,

···

On Mon, Jan 30, 2012 at 1:05 PM, Tim Roberts <timr@probo.com> wrote:

Virgil Stokes wrote:

How can I get the height of the system tray or how can I get the height of the
display area, excluding the system tray?

Are you assuming single monitor systems? You can find the location of
the tray using:
import win32gui
win32gui.GetWindowRect(win32gui.FindWindow('Shell_TrayWnd',''))

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Also see wx.Display.

Full monitor area: Display.GetGeometry
Client Area (i.e geometry minus tray): Display.GetClientArea

Cody

(0, 0, 1280, 976)

jmf

···

On 29 jan, 12:38, Virgil Stokes <v...@it.uu.se> wrote:

How can I get the height of the system tray or how can I get the height of the
display area, excluding the system tray?
I am using wxPython 2.8 with Python 2.6 on two different platforms: Windows
Vista and Windows 7.

import wx
wx.ClientDisplayRect()

There is also the wx.Display.GetCount static method to let you know if there is more than one monitor attached.

wx.GetClientDisplayRect() and wx.GetDisplaySize also exist (they predate wx.Display) in case those make a little more sense for you and if you're sure that you don't need to deal with more than one screen.

···

On 1/30/12 11:37 AM, Cody wrote:

Hi,

On Mon, Jan 30, 2012 at 1:05 PM, Tim Roberts<timr@probo.com> wrote:

Virgil Stokes wrote:

How can I get the height of the system tray or how can I get the height of the
display area, excluding the system tray?

Are you assuming single monitor systems? You can find the location of
the tray using:
    import win32gui
    win32gui.GetWindowRect(win32gui.FindWindow('Shell_TrayWnd',''))

--
Tim Roberts, timr@probo.com
Providenza& Boekelheide, Inc.

Also see wx.Display.

Full monitor area: Display.GetGeometry
Client Area (i.e geometry minus tray): Display.GetClientArea

--
Robin Dunn
Software Craftsman

Virgil Stokes wrote:

···

On 2012-01-30 20:05, Tim Roberts wrote:

Virgil Stokes wrote:

How can I get the height of the system tray or how can I get the height of the
display area, excluding the system tray?

Are you assuming single monitor systems? You can find the location of
the tray using:
     import win32gui
     win32gui.GetWindowRect(win32gui.FindWindow('Shell_TrayWnd',''))

Thanks Tim!

Well, the other solutions are smarter -- I think I thought I was
replying to the PyWin32 group, not the wx group. If wx is available,
then use what wx provides.

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.