Check if a window is maximized

How can I check if a window is maximized? In I used “WindowState”. Is there something similar in xojo?

You can compare the size of the window to screen(0).AvailableWidth and AvailableHeight.

There is an event handler Window.Maximise

It is badly named and actually means WillMaximise as it fires before the actual maximisation occurs i.e. just after you have pressed the maximise button.

Edit: Add a property to your window called Maximised and set it to true in the Maximise event. You would then have to set it to false if the user resizes the window < its maximised height or < maximised width.