From: Arndt Roger Schneider Date: 2010-02-03T22:35:55+09:00 Subject: Re: TK: Get the "usable" screensize"? Axel schrieb: >Hi, > >how can I get the "usable" screensize in Ruby/TK? >I mean, the total screensize minus taskbar (on Windows). > >I tried: > > require 'tk' > root = TkRoot.new > root.state('zoomed') > Tk.update > p TkWinfo.x(root) > p TkWinfo.y(root) > p TkWinfo.width(root) > p TkWinfo.height(root) > p TkWinfo.geometry(root) > >but this gives me only > total_screensize - (taskbar + window_decoration) > >window_decoration is titlebar and borders of a window, maybe >even something else. > >I found http://wiki.tcl.tk/11291 which points into the >same direction, but I cannot use it with success (it's TCL). > >I'm using: >* Windows XP >* ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-mingw32] >* TCL/TK 8.5 > >Thank you, >Axel > > MessageID:<4af30c88$0$83250$e4fe514c@news.xs4all.nl> in comp.lang.tcl 11/06/2009 Tcl: winfo screenheight . winfo screenwidth . wm maxsize . the difference should be the raw window dimensions minus titlebar, decoration, menubar (OSX), dock (OSX) and taskbar. The mentioned thread was about X11 -roger