I paste the following code into each project to get XP theme support.
'Add this at the beginning of any program to enable Windows XP Visual Styles
<System.STAThre ad()> Public Shared Sub Main()
If OSFeature.Featu re.IsPresent(OS Feature.Themes) Then
System.Windows. Forms.Applicati on.EnableVisual Styles()
End If
Application.DoE vents() 'This must be here, otherwise buttons won't
stylize
System.Windows. Forms.Applicati on.Run(New Form1)
End Sub 'Main
Is there a way I can set up the VS IDE to automatically put this code in
each form's code?
'Add this at the beginning of any program to enable Windows XP Visual Styles
<System.STAThre ad()> Public Shared Sub Main()
If OSFeature.Featu re.IsPresent(OS Feature.Themes) Then
System.Windows. Forms.Applicati on.EnableVisual Styles()
End If
Application.DoE vents() 'This must be here, otherwise buttons won't
stylize
System.Windows. Forms.Applicati on.Run(New Form1)
End Sub 'Main
Is there a way I can set up the VS IDE to automatically put this code in
each form's code?
Comment