XP Windows Forms controls with Imagelists failing to display

From version 1.1 of the .NET framework Windows Forms comes with support for the XP style with the Application.EnableVisualStyles() API call. However the results of calling this can be unexpected – all of the display elements on your forms that load resources from imagelists (such asd toolbars, treeviews, and list views) fail to paint correctly.

Tow ork around this you need to rememer to call Application.DoEvents() after calling Application.EnableVisualStyles() and before calling Application.Run()

There is an example of this on MSDN





This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s