Maximize event fires too early

Hello Forum,

It seems the maximize event fires at that moment the user clicks the maximize button.
I wonder anyhow how I could get notified when a window has been completely maximized?

In other words: I’m looking for a “Window-Zooming-Completed” event.

Any ideas?

Start a timer in the event so it starts a millisecond later?

Or set a flag and react in resized event?

Good idea - but unfortunately also the resized event fires during maximizing.
I think I’ll wait a second…

The Resized event fires once at the end of the resizing. So when the user maximizes a window, you get the following events:

Maximize Resizing Resizing Resizing ... Resizing Resized
So if you need to know if a Resized event happens only after Maximinize, but not after Minimize or Restore set a flag (a boolean property in the window) and inspect it in the Resized event.

[code]Class MyWindow

Property mMaximizeFlag As Boolean

Event Maximize()
mMaximizeFlag = True
End

Event Resized()
If mMaximizeFlag Then
mMaximizeFlag = False
// Maximizing has finished
Else
// Minimizing or restoring has finished
End
End

End[/code]

Thank you, Eli Ott,

I understand the machanism behind maximizing a window.
The pitty is: it doesn’t work - the maximize event does not fire at all !

Is ther a hidden property I have to set in order to get a maximize event?

Okay - got it.

Under OS X, I have to deselect the full-screen button.
Only then the green button behaves like a maximize button.

When giving the green button a full-size functionality, the maximize event doesn’t fire.

So XOJO lacks of a window.FullSized event…

Thx to all for your help!

That’s correct.

Wrong, the Resizing and the Resized event fires when entering FullScreen.