【发布时间】:2019-04-11 02:54:03
【问题描述】:
我创建了一个无边框表单,并且已经能够通过此代码激活表单移动事件:
[System.Runtime.InteropServices.DllImportAttribute("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[System.Runtime.InteropServices.DllImportAttribute("user32.dll")]
public static extern bool ReleaseCapture();
private void FASTMain_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
}
private void FASTMain_Move(object sender, EventArgs e)
{
WindowState = FormWindowState.Normal;
}
我想知道是否也可以拦截窗体上的鼠标双击事件。
【问题讨论】:
标签: c# winforms double-click borderless