Re: the "real" screen size [message #73018 is a reply to message #73016] |
Mon, 25 October 2010 08:28   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Oct 25, 10:17 am, David Fanning <n...@dfanning.com> wrote:
> So, we are still looking for a machine-independent solution.
> At the moment, however, we only have to calculate fudge
> factors for Windows machines, which is an improvement.
> These fudge factor only depend on which version of Windows
> you are using, how you have configured your machine, and
> other factors too numerous to mention. :-)
Does the function below originally written by Dick Jackson work for
Windows? (I don't have a Windows machine to test it.)
--Wayne
;; Handy function for getting screen size of primary monitor,
optionally
;; excluding the taskbar (Windows only)
;;
;; 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
|
|
|