Under the .NET framework version 1.0, enabling XP visual styles in an application required a fair bit of work. It was necessary to
either embed an unmanaged "manifest" resource file in your assembly, or distribute this manifest file with your application, separate
from your main assembly.
Version 1.1 added a new method called Application.EnableVisualStyles which could be called in your application startup
code to accomplish roughly the same thing, albiet with a caveat. Due to a bug in the framework, it was also necessary to also call
Application.DoEvents after EnableVisualStyles or ImageList components would sometimes stop working.
Version 2.0 of the framework fixes the ImageList bug, thus it is unnecessary to call Application.DoEvents.
The VisualStyles Solution
Now that we've given you a history lesson on the elusive Application.EnableVisualStyles method, we're going to show you how
easy it is to do it with Skybound VisualStyles (using any version of .NET).
C#
using (VisualStyleContext.Create())
Application.Run(new Form1());
VB.NET 2.0
Using VisualStyleContext.Create
Application.Run(new Form1)
VB.NET
Dim context As VisualStyleContext = VisualStyleContext.Create
Application.Run(new Form1)
context.Dispose
Close