In my winform program I need to detect when the form is resized: but the ResizeEnd
method is also called when the form is simply moved into the desk..
Is it possible check only when the windows is only resized??
In my mind I can save the last width and the last height and into the ResizeEnd
method like this:
int lastWidth;
int lastHeigth;
private void frmMain_ResizeEnd(object sender, EventArgs e)
{
if (lastHeigth != this.Height || lastWidth != this.Width)
{
lastHeigth = this.Height;
lastWidth = this.Width;
fireResize();
}
}
But this is an ugly solution...