Description: After you resolve a custom irregular form, you cannot drag the problem.
Look first:
The code is as follows:
Using system;using system.collections.generic;using system.componentmodel;using system.data;using System.Drawing; Using system.linq;using system.text;using system.windows.forms;using system.drawing.drawing2d;namespace BT{ public partial class Form1:form {public Form1 () { InitializeComponent (); } Private point Mouse_offset; protected override void OnMouseDown (MouseEventArgs e) { base. OnMouseDown (e); Mouse_offset = new Point (-e.x,-e.y); } protected override void OnMouseMove (MouseEventArgs e) { base. OnMouseMove (e); if (E.button = = System.Windows.Forms.MouseButtons.Left) {point mousepos = control.mouseposition; Mousepos. Offset (Mouse_offset. X, Mouse_offset. Y); location = Mousepos;}}}
C # Move irregular forms