Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Place the layout in the middle of the screen ?


This topic is 4266 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

in a script:

 

Move/Resize Window[Current Window; Height: Get(WindowHeight); Width: Get(WindowWidth); Top: (Get(ScreenHeight) - Get(WindowHeight))/2; Left: (Get(ScreenWidth)-Get(WindowWidth))/2]

  • Like 1
Posted

To be persnickety, I recommend Get ( WindowDesktopHeight ) and Get ( WindowDesktopWidth ) instead of Get ( ScreenHeight ) and Get ( ScreenWidth ), in case the user is on Windows with a non-maximized application window.

Posted

I use a pair of custom functions to automatically place the window in the centre of the screen, cf_CenterWindowTop ( height), cf_CenterWindowLeft ( width ) where height and width are the dimensions of the window you are trying to centre.

 

You can find these on www.briandunning.com  if you enter the seach terms 'center window'

 

Thanks to Stephen Dolenski, Ocean West Consulting, Inc  for sharing these.

 

Brian

This topic is 4266 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.