winform窗体的样式很单一,不够漂亮,往往我们需要对窗体进行重写,但是我们又要保留在重写前窗体本身带的功能,例如拖动窗体的头进行移动之类的. 一下方式可以实现该方法: [DllImport("user32")] public static extern int ReleaseCapture(); [DllImport("user32")] public static extern int SendMessage(IntPtr hwnd, int msg, int
//为DllImport导出命名空间, using System.Runtime.InteropServices; public partial class Form1 : System.Windows.Forms.Form { #region FormBorderStyle为None,拖放窗体 [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dl