|
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
|
|
using System.Data;
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
using System.Drawing;
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
|
|
+using System.Runtime.InteropServices;
|
|
|
using System.Text;
|
|
using System.Text;
|
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms;
|
|
|
using UAS_MES.DataOperate;
|
|
using UAS_MES.DataOperate;
|
|
@@ -15,6 +16,23 @@ namespace UAS_MES.PublicForm
|
|
|
public partial class ChangePwd : Form
|
|
public partial class ChangePwd : Form
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
+ //所有用到了headBar的部分都需要这段代码
|
|
|
|
|
+ [DllImport("user32.dll")]
|
|
|
|
|
+ public static extern bool ReleaseCapture();
|
|
|
|
|
+
|
|
|
|
|
+ [DllImport("user32.dll")]
|
|
|
|
|
+ public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
|
|
|
|
|
+
|
|
|
|
|
+ [DllImport("user32.dll", EntryPoint = "GetWindowLong", CharSet = CharSet.Auto)]
|
|
|
|
|
+ public static extern int GetWindowLong(HandleRef hWnd, int nIndex);
|
|
|
|
|
+
|
|
|
|
|
+ [DllImport("user32.dll", EntryPoint = "SetWindowLong", CharSet = CharSet.Auto)]
|
|
|
|
|
+ public static extern IntPtr SetWindowLong(HandleRef hWnd, int nIndex, int dwNewLong);
|
|
|
|
|
+
|
|
|
|
|
+ public const int WM_SYSCOMMAND = 0x0112;
|
|
|
|
|
+ public const int SC_MOVE = 0xF010;
|
|
|
|
|
+ public const int HTCAPTION = 0x0002;
|
|
|
|
|
+
|
|
|
DataHelper dh;
|
|
DataHelper dh;
|
|
|
string ErrorMessage;
|
|
string ErrorMessage;
|
|
|
|
|
|
|
@@ -43,6 +61,7 @@ namespace UAS_MES.PublicForm
|
|
|
dh = new DataHelper();
|
|
dh = new DataHelper();
|
|
|
UserName.Text = BaseUtil.GetCacheData("LastLoginUser").ToString();
|
|
UserName.Text = BaseUtil.GetCacheData("LastLoginUser").ToString();
|
|
|
Confirm.Enabled = false;
|
|
Confirm.Enabled = false;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void checkpwd_TextChanged(object sender, EventArgs e)
|
|
private void checkpwd_TextChanged(object sender, EventArgs e)
|
|
@@ -55,5 +74,11 @@ namespace UAS_MES.PublicForm
|
|
|
Confirm.Enabled = true;
|
|
Confirm.Enabled = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ private void headBar1_MouseDown(object sender, MouseEventArgs e)
|
|
|
|
|
+ {
|
|
|
|
|
+ ReleaseCapture();
|
|
|
|
|
+ SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|