In the OnResize() event is it possible to detect whether the form is really
being resized as opposed to just restoring itself to its previous size?

Presumably I could keep track of the size of the clientRectangle but it
seems as though there must be an easier way.

Thanks in advance.

Valerie Hough

Re: Detecting whether form was minimized before OnResize() by Dave

Dave
Sun Aug 20 11:51:43 CDT 2006

Hi Valerie,

/// <summary>Stores the last known <see cref="FormWindowState" />
/// during a <see cref="Resize" /> event.</summary>
private FormWindowState lastResizedState;

protected override void OnResize(EventArgs e)
{
base.OnResize(e);

if (lastResizedState == this.WindowState)
// form is resizing, but not switching state
{
// do stuff during resize
}
else
// keep track of the state change
lastResizedState = this.WindowState;
}

--
Dave Sexton

"Valerie Hough" <sales@pcTrans.com> wrote in message news:u8vF$Y9wGHA.2120@TK2MSFTNGP03.phx.gbl...
> In the OnResize() event is it possible to detect whether the form is really being resized as opposed to just restoring itself to
> its previous size?
>
> Presumably I could keep track of the size of the clientRectangle but it seems as though there must be an easier way.
>
> Thanks in advance.
>
> Valerie Hough
>