How to enable Windows XP Visual Styles of .net application

 
Visual style is the appearance of the user interface of an application or operating system that can be modify. In .net there are many controls that use visual style of the operating system automatically such as MonthCalendar, scrollbar etc. By default, Windows XP provides a new visual style. If you call EnableVisualStyles property then most of your Windows Forms controls will automatically use the visual style when your application is run on Windows XP.
You can do this with the help of code as well as project properties.

If you want to enable XP visual style, follow these steps:

1. Open application properties(right click on project in solution explorer, select ‘Properties’)

2. Select ‘Application’ tab.

3. Check ‘Enable XP Visual Style’

If you want to do with code, write this code in application start up method:

[VB]

Application.EnableVisualStyles()

[C#]

Application.EnableVisualStyles();