调整的C#Windows窗体时防止窗口重绘 [英] Prevent window redraw when resizing c# windows forms
问题描述
Windows消息或事件可我听,以便从被重画每个像素的它是停止调整窗口是什么?
What windows message or event can i listen to in order to stop a window from being redrawing every pixel of it's resize?
这就是,当用户点击窗口的边缘,并开始重新它的大小,我不想重新绘制的全部内容,直到他我们走吧。这是因为某种原因,它在可能调整是当前震荡,因为一切都在重新对接,什么不是。
That is, when a user clicks on the edge of the window and starts to re-size it, i don't want to re-draw the entire contents until he lets go. This is because for some reason it's currently choppy at resizing probably because everything is re-docking and what not.
我试过WM_SIZING但只告诉我,它正在重新调整大小我想知道的大小的开始和结束,直到用户停止调整我可以暂停布局。
I tried WM_SIZING but that only tells me it's being re-sized, i wish to know the start and end of the sizing so i can suspend the layout until the user stops resizing.
推荐答案
没关系,只是发现这两个事件
Nevermind, just found these two events.
this.ResizeBegin += (s, e) => { this.SuspendLayout(); };
this.ResizeEnd += (s, e) => { this.ResumeLayout(true); };
作品请客
这篇关于调整的C#Windows窗体时防止窗口重绘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!