C# 禁止控件重绘(绘制)

完整代码:


        [DllImport("user32")]
        private static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, IntPtr lParam);
        private const int WM_SETREDRAW = 0xB; 


            //禁止pnl重绘
            //SendMessage(SelfInfo_pnlContact1.Handle, WM_SETREDRAW, 0, IntPtr.Zero);

            //允许重绘pnl
            //SendMessage(SelfInfo_pnlContact1.Handle, WM_SETREDRAW, 1, IntPtr.Zero);

//以上,第一个参数是控件


你可能感兴趣的:(user,C#)