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

Home » Public Forums » archive » the "real" 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: the "real" screen size [message #73185 is a reply to message #73042] Wed, 27 October 2010 15:11 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ronn kling writes:

> I may be missing something, but this slight modification to Dick's program
> works on my Mac....
>
> -Ronn
>
> FUNCTION GetPrimaryScreenSize, Exclude_Taskbar=exclude_Taskbar
>
> oMonInfo = Obj_New('IDLsysMonitorInfo')
> rects = oMonInfo -> GetRectangles(Exclude_Taskbar=exclude_Taskbar)
> pmi = oMonInfo -> GetPrimaryMonitorIndex()
> Obj_Destroy, oMonInfo
> if !d.name eq 'WIN' then begin
> Return, rects[[2, 3], pmi] ; w & h of primary monitor avbl.
> space
> endif else begin
> return, rects[[2, 3], pmi] - [0,rects[1]]
> endelse
> END

I don't have a Macintosh, obviously, or I would have
a better idea of what I was talking about, probably.
I think this might indeed work, but for the wrong reasons. :-)

That is to say, the monitor size is wrong, by about 22 pixels,
and then when you subtract another 22 pixels from that wrong
value, you get (surprise!!) exactly the fudge factor I've
hardcoded for the "dock". So, in effect, you found the right
value by subtracting the a decent guess at the fudge factor
from the wrong monitor size value.

Humm. Yes, I guess that algorithm is as good as any! :-)

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
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: POLY_2D and anti-aliasing
Next Topic: Re: Z-Graphics Buffer Resolution

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

Current Time: Tue Dec 02 05:42:25 PST 2025

Total time taken to generate the page: 0.72386 seconds