Click here to Skip to main content
11,928,587 members (48,682 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
Is there anyway possible to display my winForm and winForm controls with XP Visual Style even if the user's OS had all visual effects disabled?
Posted 3-Oct-12 11:37am
I wonder why?
Sorry about not answering the question, but isn't that obvious that XP style is ugly? Well, it's a matter of artistic taste, etc., but most people with such sense I ever asked agree that Win 2K has outdated but reasonable look, Windows 7 is good enough, but XP looked totally tasteless even at the time of its introduction to market, a big mistake of Microsoft design. Microsoft finally fixed the mistake in a decent way, and why would you like to come back it it?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question. Practically, you can consider it as the main and most principle part of the answer. However, I want to avoid accusation in relying on individual taste (which of course would not be correct), so this is still a "personal" comment.

So, here is the real answer: yes and no.

Yes, because you can imitate any style you want, pixel by pixel. In turn, this is possible because you can always handle so-called "non-client" windows message which actually define the rendering of all of the style elements of all windows, by you also would need to do custom rendering of all standard controls, because they are also the subjects of styles. This can be done via custom drawing and/or handling of the WM_PAINT messages. Before we move the the "no" aspects, note that this would be very difficult; and a lot of (purposeless) work. Also, is it solution or not? It depends on the exact meaning of "display with XP style". At least, you can reproduce and preexisting style, in principle, but this is not the universal solution.

No, because if the user disables the styles globally, it is done on purpose and handled by Windows properly. In other words, there is some kind of "style engine" which is bypassed as a whole thing. After that, some "default" styles are left, such as default old W2K style and default XP style. Usually, the support of styles means that the user can create some custom style merely composed of the same style elements, optional colors, etc., all together maintaining some stylistically consistent solution (I never saw users able to make something really attractive out of it, but this would be, again, a matter of individual taste, something I want to avoid; what is important, this feature formally works this way, providing this kind of custom choice). If this is something you really want, you cannot achieve that, even if you do all the work described in the above "yes" paragraph. Besides, it's almost impossible to predict how some style element will look in all modes before you actually try it, so the imitation I described above cannot be reliable, to say the least.

General conclusion: even though you can do something to approach the goal, it has very little practical sense; and I would probably prefer to say: no sense at all.

Donald Allen 3-Oct-12 21:57pm
Thanks for the reply and explanation. I think I'm misinformed; when I say XP style I was under the impression that XP style was most glossy, stylish, etc look. Basically what I want to do SA is giving my winForm and controls that round, smooth and glossy look even the user has his OS configured to for performance which disables these features.
Again, "glossy" and "stylish" is a matter of personal taste. And after, all, there are such irrational things as hype and marketing. I told you my educated opinion based on some industrial design education/views and my taste, but I don't want to argue over it.

Did you see Windows 7? This is really "glossy", even though it might be considered less then perfect.

I have another idea. If you are able to create some attractive design (maybe, with someone's advice) and really want to stand out visually, you could take an opposite route: create a style totally independent from OS style. Even though this is usually a "show-off" approach more typical for gaming and some some kind of kitsch, it depends on that style. It really can be good, and dissonance with general OS style does not spoil the impression. Technically, this is actually much simpler (but much harder then no using default style); as to the visual design value... it depends on the artist.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100