COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Centre Window in Middle or Screen

• Email
• 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

See related articles to this posting

```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

```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

```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??

Hopefully helping harassed humans happily handle handiwork hardships  ;o)
```
 0

3 Replies
2394 Views

Similar Articles

11/30/2013 4:49:17 AM
page loaded in 54226 ms. (0)