Get main window size in fullscreen

Good morning

Starting to move my pipewriter application to Raspberry Pi as it is the final host running it (o;

As the target screen size is not defined yet, I want to get the main windows height and width when the application is launched in fullscreen mode.

When I use the main windows open event I just get the width and height as it is defined in Xojo, but not the fullscreen size.

Using the resized event and display a MsgBox with the window size it shows the correct size minus menu bar, but the MsgBox can not be closed.

So which event would fit best to get the main window size to adjust the controls accordingly?

thanks in advance
richard

Hmm…

Screen(0).Width and Screen(0).Height might be a solution to put into the open event for the main window…

and maybe you need the .bounds from window

If it’s only for when your app starts, you should try the Activated event.
Otherwise, use a timer with a short period that you enable when the window resizes. The timer then can handle the new size.

or create the window object, size it, show it. (and default not visible)
instead of implicit instance.

Even without implicit instance, the thing is to avoid resizing/setting to full screen from the opening event if the goal is to query the final size, as the resize will happen after the event.

Well actually the goal is just to adjust the controls to different touchscreen sizes.

The application itself is always set to fullscreen, so Screen(0).Width/Height seems to be the simplest way as in fullscreen mode this represents the window size when to menu is used.