什么是Invalidate和OnPaint之间的区别

时间:2012-11-26 04:59:02

标签: c# winforms graphics

在我的Winforms应用程序中,我想发送一个Paint请求。

我应该使用哪种方法?另外,InvalidateOnPaint之间的基本区别是什么?

1 个答案:

答案 0 :(得分:2)

OnPaint是实际绘画的方法。

无效是一种请求重新绘制控件或表单的方法。

Whats the difference between Control.Invalidate, Control.Update and Control.Refresh?