Centre Window in Middle or Screen

  • Follow


Hi,

Does anybody have a formula for repositioning a window in the middle of the 
screen?

Many thanks,
Andrew 


0
Reply splash (1) 7/19/2005 11:43:55 AM

On Tue, 19 Jul 2005 11:43:55 GMT, Telstra Bigpond wrote:
>  Does anybody have a formula for repositioning a window in the middle of the 
>  screen?

get the screen resolution,
get the window size,

set top left (or any other) corner to (xscreen - xwin)/2, (yscreen -
ywin)/2.

I guess not all of this is supported by FMP functions - maybe you need
such things as AppleScript.

- Martin
0
Reply Martin 7/19/2005 12:05:38 PM


Andrew,

You would use the Move/Resize Window function.  For the Distance from 
Top, use the following calculation:
      (Get(ScreenHeight)/2) - (Get(WindowHeight)/2)
and for the Distance from Left, use this calculation:
      (Get(ScreenWidth)/2) - (Get(WindowWidth)/2)

Hope that helps.

Tim

Telstra Bigpond wrote:
> Hi,
> 
> Does anybody have a formula for repositioning a window in the middle of the 
> screen?
> 
> Many thanks,
> Andrew 
> 
> 


-- 
==========================================================================
Tim Trimble - timdottrimbleatgmaildotcom
http://www.timothytrimble.info
Home of The ART of Software Development Blog
==========================================================================
0
Reply ttrimble 7/19/2005 3:57:49 PM

In article <%H5De.52775$oJ.6898@news-server.bigpond.net.au>, "Telstra
Bigpond" <splash@nospamthanks.mac.com> wrote:

> Does anybody have a formula for repositioning a window in the middle of the 
> screen?

You don't say which version of FileMaker and I'm not sure if there's
anything new in FileMaker 7, but older versions of FileMaker don't have
the ability to move or re-size the window. If you want the window
centred on the screen you'll have to do it by manually dragging the
window into position. FileMaker will then save that new psotion (at
least it does on the Mac, I'm not sure about Windows).

There may be some plug-ins around that allow you to manipulate the
window, but I can't recall any and they're usually expensive anyway -
is it really worth somthing like US$50+ just to centre a window??


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 7/22/2005 6:38:36 AM

3 Replies
1882 Views

(page loaded in 0.089 seconds)

Similiar Articles:













7/20/2012 11:01:49 PM


Reply: