110,536
社区成员
发帖
与我相关
我的任务
分享
protected override void OnPaint(PaintEventArgs e)
{
if (this.Width < 200)
{
this.Width = 200;
}
if (this.Height < 200)
{
this.Height = 200;
}
CaculatePartLocation(); //此处方法为重新计算窗体的位置等值
base.OnPaint(e);
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == 0x0005)
{
if (this.Width < 200)
{
this.Width = 200;
}
if (this.Height < 200)
{
this.Height = 200;
}
}
}
protected virtual void btnMin_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.WindowState = FormWindowState.Minimized;
}
}