C# 双缓存机制(绘图时解决闪烁问题)
官网推荐方案
链接: link.
具体方案(How to: Manually Render Buffered Graphics)
1.Obtain a reference to an instance of the BufferedGraphicsContext class.
2.Create an instance of the BufferedGraphics class by calling the Allocate method, as shown in the following code example.
// This example assumes the existence of a form called Form1.
BufferedGraphicsContext currentContext;
BufferedGraphics myBuffer;
// Gets a reference to the current BufferedGraphicsContext
currentContext = BufferedGraphicsManager.Current;
// Creates a BufferedGraphics instance associated with Fo