formborderstyle

How to move and resize a form without a border?

混江龙づ霸主 提交于 2019-11-26 07:59:55
Does anyone know how I can resize a winform when it has no border. I don't want the default border that Windows has, so I changed the property "FormBorderStyle" to "None". This removed the border, although now it can't be resized. I've figured out how to move the form around, I just need to know how to resize it. Some sample code that allow moving and resizing the form: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; this.DoubleBuffered = true; this.SetStyle(ControlStyles.ResizeRedraw, true); } private const int cGrip =

How to move and resize a form without a border?

不打扰是莪最后的温柔 提交于 2019-11-26 03:27:10
问题 Does anyone know how I can resize a winform when it has no border. I don\'t want the default border that Windows has, so I changed the property \"FormBorderStyle\" to \"None\". This removed the border, although now it can\'t be resized. I\'ve figured out how to move the form around, I just need to know how to resize it. 回答1: Some sample code that allow moving and resizing the form: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.FormBorderStyle =