I want to run some code after my form is resized. However, the following code never runs when I resize. I'm sure it is something simple I looked over(I am brand new to C# and programming in general). Thanks.
private void CalibrationForm_ResizeEnd(object sender, EventArgs e)
{
MessageBox.Show("You are in the Form.ResizeEnd event.");
}
You can resize individual controls, and you can resize multiple controls of the same or different kind, such as Button and GroupBox controls.
To make a control resize with the form, set the Anchor to all four sides, or set Dock to Fill . It's fairly intuitive once you start using it. For example, if you have OK/Cancel buttons in the lower right of your dialog, set the Anchor property to Bottom and Right to have them drag properly on the form.
Resizing of the form can be disabled by setting the FormBorderStyle property of the form to `FixedDialog`, `FixedSingle`, or `Fixed3D`.
simply set Autoscroll = true for ur windows form.. (its not good solution but helpful).. Save this answer.
You seems not hooking the event, even hook it in the properties (right click form then properties and choose the event as in the picture)
or hook the event in the constructor as follows:
YourForm.ResizedEnd +=new EventHandler(CalibrationForm_Resize);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With