Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Enable Windows XP Visual Styles for a property sheet extension

 
Subscribe to the RSS feed for this forum  Forum Index -> EZShellExtensions.Net
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Thu Apr 24, 2008 2:37 pm    Post subject: HOWTO: Enable Windows XP Visual Styles for a property sheet extension

To enable Windows XP Visual Styles (themes) for a property sheet extension, call the Application.EnableVisualStyles method at the very beginning of the constructor of the PropertySheetExtension derived class as follows :

[C#]

// AssemblyInfo is a PropertySheetExtension derived class
public AssemblyInfo()
{
Application.EnableVisualStyles();
InitializeComponent();
}


[VB.Net]

' AssemblyInfo is a PropertySheetExtension derived class
Public Sub New()
MyBase.New()

Application.EnableVisualStyles()
InitializeComponent()

End Sub


Notes
Set the BackColor property of the PropertySheetExtension to Transparent to make sure that the child controls such as labels are drawn correctly when using XP visual styles.
Back to top
Display posts from previous:   
Forum Index -> EZShellExtensions.Net All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group