form1_Sizechanged (maximize/minimize ???)

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

I have athe following code, but nothing happens when I minimize or maximze
the form using "top right corner minimze/maximize icons". What am I
missing!!!!! Help please!!!!!!!!!!

Thanks
JJ



private void Form1_SizeChanged(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}
 
JJ said:
I have athe following code, but nothing happens when I minimize or maximze
the form using "top right corner minimze/maximize icons". What am I
missing!!!!! Help please!!!!!!!!!!

Try checking in the ReSize event. To get my dialog to cover all isntances
of resizing properly I had to respond to both of them. Off the top of my
head though, I don't recall which covered what.
 
Back
Top