How can I fix the form size in a C# Windows Forms application and not to let user change its size?
Solution 3Right click on your form and go to properties. Then go to Layout options,see there are a property named Size. Change it as your need as width and length wise. Also see a property named StartPosition just after the Size property.
By dragging either the right edge, bottom edge, or the corner, you can resize the form. The second way you can resize the form while the designer is open, is through the properties pane. Select the form, then find the Properties pane in Visual Studio. Scroll down to size and expand it.
simply set Autoscroll = true for ur windows form..
Check this:
// Define the border style of the form to a dialog box. form1.FormBorderStyle = FormBorderStyle.FixedDialog; // Set the MaximizeBox to false to remove the maximize box. form1.MaximizeBox = false; // Set the MinimizeBox to false to remove the minimize box. form1.MinimizeBox = false; // Set the start position of the form to the center of the screen. form1.StartPosition = FormStartPosition.CenterScreen; // Display the form as a modal dialog box. form1.ShowDialog();
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