I've got this code in a pair of button click event handlers on a C# form:
class frmLogin
{
private const int SHORT_HEIGHT = 120;
private const int LONG_HEIGHT = 220;
private EventHandler ExpandHandler;
private EventHandler ShrinkHandler;
public frmLogin()
{
InitializeComponent();
ExpandHandler = new EventHandler(btnExpand_Click);
ShrinkHandler = new EventHandler(btnShrink_Click);
btnExpand.Click += ExpandHandler;
}
private void btnExpand_Click(object sender, EventArgs e)
{
this.Height = LONG_HEIGHT;
btnExpand.Text = "<< Hide Server";
btnExpand.Click -= ExpandHandler;
btnExpand.Click += ShrinkHandler;
}
private void btnShrink_Click(object sender, EventArgs e)
{
this.Height = SHORT_HEIGHT;
btnExpand.Text = "Choose Server >>";
btnExpand.Click -= ShrinkHandler;
btnExpand.Click += ExpandHandler;
}
}
The text change occurs without issue, but on one particular client machine, a Dell M4300 laptop workstation, the height change does not take effect. Has anyone resolved a similar issue, and what was the fix if so?