0

I'm using both C#.NET and vb.NET with framework 4.0 for a mixture of applications being run on a Windows XP computers. By default, all these computers have their visual effects set to "Adjust for best performance". Of course this doesn't make my application look the nicest... I was wondering if there was a way via code that you could enable the themes/better appearance without having to manually change the settings under my computer.

I've tried the Application.EnableVisualStyles method but it doesn't seem to do the trick.

Photos of what I mean, sorry about it being vauge.

http://www.fanhow.com/images/5/57/How_to_Adjust_for_best_performance_in_Windows_XP3.jpg

Compared to

http://i.udm4.com/screenshots_u4win/993/993720_2.jpg

JustLearning
  • 37
  • 1
  • 7
  • 2
    This is too vague. What do you mean by "the nicest"? How does your application look and how do you want it to look? – millimoose Mar 14 '13 at 20:55
  • Yeah, sorry. I'm not 100% with what its actually called. In XP when the computer is set to 'best performance' everything is that dark grey color and hard edges. When set to 'best appearance' you get the soft round edges, green loading bars etc. – JustLearning Mar 14 '13 at 21:00
  • I think I understand the question. There's some discussion around changing those values here http://stackoverflow.com/questions/9897310/can-you-change-the-visual-effects-performance-settings-from-an-application – evanmcdonnal Mar 14 '13 at 21:02
  • @JustLearning Thing is, I'm 0% sure what you're actually talking about. Make screenshots instead of prose descriptions. Possibly also make a code sample with, say, one control only that shows up wrong. – millimoose Mar 14 '13 at 21:02
  • You've disabled visual styles system-wide and got the Windows Classic look. You can't turn it on for just your program. It would look drastically out of place compared to all other programs that run on that machine anyway. This otherwise made only sense 10+ years ago. – Hans Passant Mar 14 '13 at 22:15

1 Answers1

1

Going by your comments, you can't. When "Apply visual styles" is unchecked in the System Properties control panel Windows (XP through 7) will never apply visual styles to any and all applications.

There was a performance case for disabling visual-styles on machines slower than 400Mhz and less than 128MB of RAM - but now our computers are around 50 to 100 times more powerful, unless you're using 13 year-old hardware there is no reason to disable visual styles (unless you find them ugly, of course).

This does not apply to Windows 8 because the visual style engine is always enabled and cannot be turned off (except in Hyper-V Server, for some reason).

Dai
  • 141,631
  • 28
  • 261
  • 374
  • Okay, thank you. The computers are work computers which come standard like that. Even though they are i5's with 4Gb ram etc (I don't understand why...) – JustLearning Mar 17 '13 at 21:12