I added WinXP button style to my app, and now I can't change the button text color, it is always black, because I had to set flat style to "System" (otherwise I won't have the XP style). Is there a way to change it?
Printable View
I added WinXP button style to my app, and now I can't change the button text color, it is always black, because I had to set flat style to "System" (otherwise I won't have the XP style). Is there a way to change it?
When the button style is set to System in order to obtain the VisualStyles effect, you may need to change the VisualStyle Text
for the button to a user defined color. The VS are drawn on a second layer on top of the control (button). So it may look like the text is not changing
but underneath the visual stlye it is being drawn in the color you choose. To get around this you probably need to change the Visual Style Text
effect be interacting directly with the theme.
hmm... Can you please make a screenshot of that VS position? I can't find it.
Its not a position so to speak but rather think of the visual styles as a layer that is placed over the controls that are set with a
Flatstyle of System. Its like skinning a control or form. You cant see it. Its the inner working of VB. Only the visual effect when
the form is displayed.
Ah, I got it... Well, is there a way to change it and if it is, how?
See this thread of mine where I am trying to do things like this.
VisualStyles
I strongly recommend visiting www.skybound.ca and downloading their free VisualStyles component. It fixes almost all the common visual style issues in VS.NET 2003 and allows you to use all the standard .NET controls without changing properties, adding manifests or other fiddly stuff. It involves a couple of lines of code and adding a single component to each form. Everything else is done for you.
I downloaded Skybound's VisualStyles component, and it is really easy to use and does a great job! I have one question. If I need to go trough the following code for each control (As System.Windows.Forms.Control), I think it is not the best solution to write it 100 times if I have 100 controls in the form. How to do it with the for loop or something similar?
Resolved!
Nebo
I'm not sure what you mean. You should simply be able to add a VisualStyleProvider to each form and all existing controls will support the additional visual style functionality automatically and by default.Quote:
Originally Posted by Nebo_vb
Edit:
Sorry. Started writing post before your edit.