How to detect when a windows form is being minimized?

You can use the Resize event and check the Forms.WindowState Property in the event.

private void Form1_Resize ( object sender , EventArgs e )
{
    if ( WindowState == FormWindowState.Minimized )
    {
        // Do some stuff
    }
}

Leave a Comment