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

1.4k Views Asked by At

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.

1

There are 1 best solutions below

2
On BEST ANSWER

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