how to make windows form application design looks like windows 7 – Enable Visual Styles

how to make windows form application design looks like windows 7 – Enable Visual Styles

If you see any control visual looks is not just what it was looking on interface design mode (or windows style looks) like below 2 images

looks of interface design mode

Without Enable Visual Styles or Windows Classic Looks

Then It means you are skipping a method call from System.Windows.Forms Namespaces, that isĀ EnableVisualStyles

To Enables visual styles or operating system like controls color, fonts and other visual elements for your application just use below code before application run on Main method.

Application.EnableVisualStyles();

as below

[STAThread]
static void Main()
{
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Form1());
}

Leave a Reply

  • (will not be published)