private void panTitle_MouseDown(object sender, MouseEventArgs e)
{
sender = panIPlugIn;
System.Windows.Forms.Panel p = (System.Windows.Forms.Panel)sender;
if (e.Button == MouseButtons.Left)
{
if (e.Clicks == 1)
{
ReleaseCapture();
SendMessage(p.Handle, 0xA1, 0x02, 0);
}
else if(e.Clicks.CompareTo(2)==2)
{
panTitle.DoubleClick += new EventHandler(panTitle_DoubleClick);
}
}
}
private void label1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
if (e.Clicks == 1)
{
if (!isMaxFrm)
{
ReleaseCapture();
//发送消息 让系统误以为在标题栏上按下鼠标
SendMessage((IntPtr)this.Handle, VM_NCLBUTTONDOWN, HTCAPTION, 0);
ShowTreeViewTool();
label1_Click(sender, e);
}
}
}
if(e.Clicks == 2)
{
btn_MaxSize_Click(sender, e);
}
}