Skip to content

Commit

Permalink
ExternsionsMP: fix ShowUserControl minimize bug (#3479)
Browse files Browse the repository at this point in the history
When minimizing a form generated by ShowUserControl, the client size
gets set to 0, which causes issues when the form is restored. Sizes
should only be copied when the window state is normal.
  • Loading branch information
robertlong13 authored Jan 17, 2025
1 parent 9802aa9 commit 2d32aca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utilities/ExtensionsMP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ private static void Ctl_SizeChanged(object sender, EventArgs e)
var frm = ctl.Tag as Form;
if (frm == null)
return;

frm.ClientSize = ctl.ClientSize;
if (frm.WindowState == FormWindowState.Normal)
frm.ClientSize = ctl.ClientSize;
}

private static void Frm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
Expand Down

0 comments on commit 2d32aca

Please sign in to comment.