How to catch max button click event? (C#)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have MDIForm and some ChildForms in it. When user click maximize button in
one of child form, I want to be alerted that user has just been clicked max
button.
My purpose to do this, I want to set property Sizing Grip in status bar on
that child form to be false when it's maximized.

fyi:
I did catch the event(after user click Max button in child form) in event
Form.Resize(). But I get confused to know whether it's maximized or not. I
tried to compare Maximize size between the one that I got from user and the
other one that from System.Windows.Form.SystemInformation.MaxWindowTrackSize.
But they are different, so I can not use the one from SystemInformation.

Any solution for this? Great thanks for any help!!
Deasy
 
Hi Deasy,

On your Resize event handler check form's WindowState property. It will tell
you whether the form is minimized, maximixed or in normal state
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top