Button Forecolor Property and XP

P

Paul Fairless

I have created a Windows XP manifest file to enable my VB.NET applications
to exhibit the characteristics of the XP style.

On a form I have a button and I have explicitly set its forecolor property
to RED. However when it displays, the text on the button remains BLACK!

Why is this and how do I correct it?

Many Thanks
Paul F
 
H

Herfried K. Wagner [MVP]

Paul Fairless said:
I have created a Windows XP manifest file to enable my VB.NET applications
to exhibit the characteristics of the XP style.

On a form I have a button and I have explicitly set its forecolor property
to RED. However when it displays, the text on the button remains BLACK!

Why is this and how do I correct it?

That's because you have set the button's 'FlatStyle' property to 'System'
and the 'System' rendering style doesn't support setting the foreground
color of the button.
 
P

Paul Fairless

Thank You for your reply Herfried.

I have tried setting the Flatstyle property to other settings such as
'Standard', but although I now get the red forecolor, I loose the XP style.
How do I achieve both?

Many Thanks

Paul F
 
H

Herfried K. Wagner [MVP]

Paul Fairless said:
I have tried setting the Flatstyle property to other settings such as
'Standard', but although I now get the red forecolor, I loose the XP
style. How do I achieve both?

IIRC .NET 2.0 will support this scenario. In the meantime you may want to
use the button control presented at
<URL:http://dotnetrix.co.uk/buttons.html>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top