monO
monO

Reputation: 67

Force Windows Classic Theme for Application

Hey Guys, I've searched around for this question but couldn't come up with anything.

The Problem:

If a user changes the Color Scheme on their Windows Desktop, it tweaks some functionality in my .net application.

Is there any way for me to FORCE my application to use the Windows Classic Theme, regardless of what the user's theme has been set as?

Thanks!

Upvotes: 0

Views: 8485

Answers (3)

If you are using Visual Studio: when you go to your application project's properties, you will find a checkbox Enable XP Visual Styles. If you disable that, no theming should be applied to your application. I assume this is equivalent to uncommenting the line of code that user nobugz mentioned.

Upvotes: 2

rerun
rerun

Reputation: 25495

At startup set this property on the application object.

Application.VisualStyleState = System.Windows.Forms.VisualStyles.VisualStyleState.NoneEnabled;

Upvotes: 3

Gabriel Magana
Gabriel Magana

Reputation: 4526

I have done that using DevExpress (http://devexpress.com) controls, they have their own theming engine, and one of the included themes is the Windows Classic one. The themes even style the window borders, so it is a true complete look and feel control.

As to how to do it natively without a third party control, I do not know.

Specifically, look here for the theming engine in the DevExpress control suite: http://devexpress.com/Products/NET/Controls/WinForms/Skins/

Upvotes: 0

Related Questions