To achieve a goal, fix the form size,
1. Remove the Maximize button from the form title
2. Double-click on the form title will not maximize, completely cancel maximize
Problem, if you set the form MaximizeBox and MinimumSize properties, it seems that the problem solved, the problem is that the single-click on the form title, although the size is not changed, the form position jumps to the upper left corner,
Solution One:
1 Private voidFrmfixesize_load (Objectsender, EventArgs e)2 {3 //Method One4 This. MaximizeBox =false;5 This. MinimumSize = This. MaximumSize = This. Size;6 This. FormBorderStyle =FormBorderStyle.FixedSingle;7}
Solution Two: (still need to set up MaximizeBox=false
the form),
protected Override void WndProc (ref Message m) { // method Two if0xa3 ) { return; } base. WndProc (ref m); }
This example source code download: Http://pan.baidu.com/s/1mgKEaXM Password: LFJF
WinForm form Cancel maximized double-click Title Maximization