I’ve been doing this for years. But now it’s just not working.
private void Form1_Deactivate(object sender, EventArgs e)
{
this.Size = new Size(30, 29);
txt.Visible = false;
lbl.Visible = false;
}
The form just does not change Width. But, as above, the 3 controls DO become invisible.
Any suggestions?
Windows have an absolute minimum width of 134 pixels (at least on Windows 7)
To circumvent this minimum, you can set
FormBorderStyletoFixedToolWindoworSizableToolWindow. (Or handle Windows messages)