Home >Backend Development >C#.Net Tutorial >Implementation method of GDI double buffering in .net WINFORM_Practical tips
The following editor will share with you an article on the implementation method of GDI double buffering of .net WINFORM. It has a good reference value and I hope it will be helpful for everyone to learn .net. Friends who are interested in .net, please follow the editor to take a look.
Sometimes when performing continuous GDI+ operations in a form, flashing conditions will occur. In addition to modifying the parameters of the form, The problem of refreshing itself should be solved. This may be the reason for double buffering.
Method 1:
Use GDI to draw on the bitmap, and then regenerate the bitmap
Bitmap bt = new Bitmap(510, 510); Graphics g = Graphics.FromImage(bt); g.DrawEllipse(Pens.Red, 100, 100, new Random().Next(1, 60), 50); g.Dispose(); gb.DrawImage(bt,0,0); gb.Dispose();
The implementation method of GDI double buffering of .net WINFORM in the above article is all the content shared by the editor. I hope it can give you a reference, and I hope everyone Duoduo supports PHP Chinese website.
Related recommendations:
Solutions to common problems when deploying asp.net to IIS_Practical tips
Example of implementing Forms authentication authentication process in asp.net mvc
How IIS implements the method of deploying asp.net mvc website
The above is the detailed content of Implementation method of GDI double buffering in .net WINFORM_Practical tips. For more information, please follow other related articles on the PHP Chinese website!