当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - GDI+ performance (System.Windows.Forms, System.Drawing) & Skinning

问题描述:

I would to create an application that is based on windows forms and uses custom skins. Most of the skins are bitmaps which i slice to 9 parts, so I can draw by 9 Graphics.DrawImage() calls a nice boxes/panels skinned. The problem starts when the application getting looking more like other skinned applications. When everything is visually done, the porblem is - Performance. I have also skinned windows forms that has a MDI Container panel with custom background image. When I drag such a form, screen is blinking, cluttering - generally low FPS occuring.

What can I do to write skinned, windows forms application, that have fast GUI? (I will plan not to use WPF) Thanks in advance for replies.

网友答案:

Graphics.DrawImage() does alot more than simply draw the image, you could P/Invoke BitBlt instead to greatly improve performance.

See for instance http://www.codeproject.com/KB/GDI-plus/flicker_free.aspx

分享给朋友:
您可能感兴趣的文章:
随机阅读: