Hi,
I have a small issue, wondering if anyone could help.
I have a form, FormBorderStyle is set to None. I have a groupBox on the form called gbLogin. I want to be able to move the form via anywhere on the groupBox. I have searched the net and have found some solutions, none that have worked. Such as:
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HTCAPTION = 0x2;
[DllImportAttribute("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[DllImportAttribute("user32.dll")]
public static extern bool ReleaseCapture();
private void gbLogin_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
}
Does anyone have a solution?
Thanks
Jay