How can I use XP Themes with Windows Forms using the .NET FrameWork 1.1?

Platform: WinForms| Category: Tips

The .manifest file is not required if you are using .NET FrameWork 1.1. You can now use the application’s EnableVisualStyles() method which should called before creating any controls.
You also need to ensure that the FlatStyle property of the control is changed to System instead of the default value of Standard.


[C#]
	static void Main() 
	{
		Application.EnableVisualStyles();
		Application.Run(new Form1());
	}


[VB.Net]
      Public Shared Sub Main()

            System.Windows.Forms.Application.EnableVisualStyles()
            System.Windows.Forms.Application.Run(New Form1)
        End Sub 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.