TechyMedia

A .NET Technology blog | .NET,C# Progamming,C# tutorials,WPF WCF|Software Engineer

NAVIGATION - SEARCH

What is the use of Application.EnableVisualStyles()?

Application.EnableVisualStyles() is essential to apply the visual styles like colors, fonts, and other visual elements to your form controls from the current operating system theme. If the control and the operating system support this controls will draw with visual styles if this method is used.
Application.EnableVisualStyles() is essential to apply the visual styles like colors, fonts, and other visual elements to your form controls from the current operating system theme. If the control and the operating system support this controls will draw with visual styles if this method is used. [More]

What is STAThread Attribute?

Attribute [STAThread] is a mandatory attribute for all windows forms application. STAThread attribute need to be applied to set the current thread apartment state as single threaded. This means that the COM threading model for the application is single-threaded apartment.
Attribute [STAThread] is a mandatory attribute for all windows forms application. STAThread attribute need to be applied to set the current thread apartment state as single threaded. This means that the COM threading model for the application is single-threaded apartment. [More]