Button Forecolor Property and XP

  • Thread starter Thread starter Paul Fairless
  • Start date Start date
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
 
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.
 
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
 
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>.
 
Back
Top