原理: panle 替换 解决刷新
/// <summary>
/// 加锁
/// </summary>
public void Lock()
{
WindowsAPI.LockWindowUpdate(this.Handle);
this.pnlChang.Location = this.pnlRight.Location;
this.pnlChang.Size = this.pnlRight.Size;
this.pnlChang.Visible = true;
this.pnlChang.BringToFront();
}
/// <summary>
/// 解锁
/// </summary>
public void UnLock()
{
WindowsAPI.LockWindowUpdate(IntPtr.Zero);
this.pnlChang.Visible = false;
}