comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: "free" screen size
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: "free" screen size [message #51574 is a reply to message #51451] Mon, 27 November 2006 15:10 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dick Jackson writes:

> In IDL 6.3, multiple monitor support was added, along with an option for
> excluding taskbar size on Windows. I wrote this function to get at the
> desired info easily:
>
>
> ;; Handy function for getting screen size of primary monitor, optionally
> ;; excluding the taskbar
> ;;
> ;; Example:
> ;; freeSize = GetPrimaryScreenSize(/Exclude_Taskbar)
> ;; Print, freeSize
> ;; 1280 946
>
> FUNCTION GetPrimaryScreenSize, Exclude_Taskbar=exclude_Taskbar
>
> oMonInfo = Obj_New('IDLsysMonitorInfo')
> rects = oMonInfo -> GetRectangles(Exclude_Taskbar=exclude_Taskbar)
> pmi = oMonInfo -> GetPrimaryMonitorIndex()
> Obj_Destroy, oMonInfo
> Return, rects[[2, 3], pmi] ; w & h of primary monitor avbl. space
>
> END

In my testing here, I find that Andrew's WINDOW_SIZE function
reports a window size of 1272 by 969 on my 1280 by 1024 display.
This accounts for the taskbar AND window decoration for the TLB,
including the window title bar.

Dick's GetPrimaryScreenSize reports 1280 by 996, which does NOT
include any window decoration (including the window title bar).
Moreover, the /EXCLUDE_TASKBAR keyword only works if the taskbar
property "keep taskbar on top of other windows" is set. If this
property is not set, then the entire window size is returned.
This is identical to what is returned in Get_Window_Size(). That
is to say, not as useful as it could be.

Bottom line, although Andrew's solution is a bit of a kludge, it
does seem to return more useful information if you have the
practical purpose of building a widget program in mind.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: showing only variables
Next Topic: "free" screen size

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 10:40:37 PDT 2025

Total time taken to generate the page: 2.72121 seconds