I’m looking for an event from a form that called after a window is maximized or minimized.
As far as I know there is such event as SizeChanged or WndProc that can handle maximized window, but it’s called right away after user try to maximize the window, and it’s not called after the window is fully maximized.
I’m looking for event like ResizeEnd, but maybe this one is called MaximizedEnd or MinimizedEnd
Is there anyway to do that?
This is what Gabriel’s solution would look like in detail. I don’t think there is an event for WindoStateChanged either.
I just tested this solution out and it is working when you click the maximize button. It appears to be getting fired 3 times though. I would maybe do a little debugging and figure out on exactly what m.Msg you want to intercept to check if the state has changed. I found a quick reference of some of those WM_ messages here http://www.autohotkey.com/docs/misc/SendMessageList.htm.
As stated the above code gets fired 3 times at least while I have tested. The below code only gets fired once. It is a bit more lengthy but also may be more intuitive and more fully addresses your question of how to fire an event. Thanks to Yore for in his comment to your question for this idea.