日期:2014-05-18  浏览次数:20844 次

在WinForm中如何做到双击窗口标题栏后就关闭该窗口?给点提示也行
呵.客户有这要求!

------解决方案--------------------
public const int WM_NCLBUTTONDBLCLK = 0xA3;

protected override void WndProc(ref Message m)
{
if (m.Msg == WM_NCLBUTTONDBLCLK)
{
this.Close();
}
base.WndProc(ref m);
}
------解决方案--------------------
支持楼上的
public const int WM_NCLBUTTONDBLCLK = 0xA3;

protected override void WndProc(ref Message m)
{
if (m.Msg == WM_NCLBUTTONDBLCLK)
{
this.Close();
}
base.WndProc(ref m);
}