I would suggest overriding the
OnResize()
method, placing the logic in there.
public class YourForm : Form
{
private const int FixedWidth = 1024;
protected override void OnResize(EventArgs e) {
if (this.Width != FixedWidth) {
return;
}
base.OnResize(e);
}
}
This may have to be adapted to your real needs/logic.
Hope this helps.