[fxruby-users] Getting size of desktop

dave L dglnz at yahoo.com
Tue Aug 17 17:21:45 EDT 2010


Hi Ralph,

I think by looking at the Rdocs you might get some pointers.

(just been their) and think maybe FXWindow may havew something you are looking for - .default_height and .default_width are two methods that may help.

also you have to realise that the screen resolution has to be right else you're program window will be off the screen too.

If you're using windows then their maybe a system command or registry setting to read in that would give you the screen size.

HTH,

Dave.


--- On Wed, 18/8/10, Ralph Shnelvar <ralphs at dos32.com> wrote:

> From: Ralph Shnelvar <ralphs at dos32.com>
> Subject: [fxruby-users] Getting size of desktop
> To: fxruby-users at rubyforge.org
> Received: Wednesday, 18 August, 2010, 1:05 AM
> 
> Getting size of desktop
>  
>  
> 
> 
>  
> 
> How can I get the size of the desktop on which I can
> place an FXRuby Window?
> 
> 
> 
> 
> What I mean:
> 
> 
> When one has several monitors on a system and one
> "extend the desktop onto this monitor" .... this,
> of course, increases the real estate onto which one can drop
> an FXRuby window.
> 
> 
> In my app, I have a configuration file giving the
> position of the app
>       position(xx, yy, ww, hh)
>       show()
> This does a nice job of placing the window where I want
> it.
> 
> 
> If I move my configuration file from one machine that
> has several monitors to my laptop, the window may be placed
> somewhere in the ozone.
> 
> 
> So ... how can I get the size of the desktop so that I
> can compute that the window will be dragable and if not,
>  can then do a
>       show(PLACEMENT_SCREEN)
> to center the FXRuby window on the center of the smaller
> desktop on my laptop?
> 
> 
> Ralph
> 
> 
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users


      


More information about the fxruby-users mailing list