panle 闪烁 通过windowsApi

原理: 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;
}

posted @ 2011-12-26 15:44  __DNet_Believe  阅读(243)  评论(0编辑  收藏  举报