Is there any method to get the monitor's resolution? 
Author Message
 Is there any method to get the monitor's resolution?

Is there any method to get the monitor's resolution?
such as
1024*768
1280*1024
?


Fri, 12 Dec 2008 15:43:47 GMT  
 Is there any method to get the monitor's resolution?

Quote:

> Is there any method to get the monitor's resolution?
> such as
> 1024*768
> 1280*1024
> ?

wm maxsize . will return the
maximum size a top level window can be, which is smaller than the
monitors resolution.

But what you really want is

winfo screenheight .
winfo screenwidth .

BUT, that doesn't seem to work for dual monitors under
Windows XP (when I test I only get the resolution of the
primary monitor).

Hope that helps

Paul



Fri, 12 Dec 2008 15:56:45 GMT  
 Is there any method to get the monitor's resolution?

Quote:

> Is there any method to get the monitor's resolution?
> such as
> 1024*768
> 1280*1024

Read the man/help page on the winfo command of Tk.  Pay particular attention
to the subcommands beginning with the string "screen".

NOTE -- some window managers have been known to lie.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+



Fri, 12 Dec 2008 16:00:50 GMT  
 Is there any method to get the monitor's resolution?


Quote:
> Is there any method to get the monitor's resolution?
> such as
> 1024*768
> 1280*1024
> ?

winfo screenwidth .
winfo screenheight .

Ilya



Fri, 12 Dec 2008 17:07:57 GMT  
 Is there any method to get the monitor's resolution?

Quote:



> > Is there any method to get the monitor's resolution?
> > such as
> > 1024*768
> > 1280*1024
> > ?

> winfo screenwidth .
> winfo screenheight .

> Ilya

Thank you


Fri, 12 Dec 2008 16:46:27 GMT  
 Is there any method to get the monitor's resolution?

Quote:


>> Is there any method to get the monitor's resolution?
>> such as 1024*768
>> 1280*1024
>> ?

> wm maxsize . will return the
> maximum size a top level window can be, which is smaller than the
> monitors resolution.

> But what you really want is

> winfo screenheight .
> winfo screenwidth .

> BUT, that doesn't seem to work for dual monitors under
> Windows XP (when I test I only get the resolution of the
> primary monitor).

you should  get the resolution of the screen that the "." window is on
the toplevel command takes a -screen option that can be used to bring
it up on a different monitor (I know this works nder X, not sure about
how windows really handle multiple monitors) - if it does work, it
then winfo screenheight $top should give the siZe of that one
(but as I said I don;t know if it works for windows or not)

Bruce



Sat, 13 Dec 2008 01:47:13 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Change Monitor Resolution in RealBasic4?

2. Help Changing Monitor Resolutions

3. Resolution of monitor

4. CW2.003 Window Resizing not saving size on high resolution monitor

5. Scaling Fonts with monitor resolution / Window sizing

6. MISC monitor resolution

7. hiding the taskbar and monitor resolution

8. iwidgets::Tabset on a high-resolution monitor

9. determining monitor resolution

10. Monitor resolutions

11. Getting method! for free from method

12. Getting method from within method?

 

 
Powered by phpBB® Forum Software