Wanting to resize tk window depending on resolution, how to obtain resolution?

What is the best cross platform trick for obtaining the users current
resolution? I want to resize my GUI depending on the resolution, but am
not sure how to go about getting the resolution.

look at Tk winfo : http://www.tcl.tk/man/tcl8.5/TkCmd/winfo.htm

and what I found here :
http://www.ruby-forum.com/topic/54864

max_x = TkWinfo.screenwidth root
max_y = TkWinfo.screenheight root

(also working with my window name instead of ‘root’)…