How to know if the main window of my program was resized