Re: Why does Button.ForeColor change button's border ? by Jeff
Jeff
Thu Oct 21 07:17:36 CDT 2004
Hi Jeffrey,
Thanks for helping out.
You are correct. The simple test case only shows the border on the button
with focus.
Not sure why my form with lots of buttons shows this border on every button?
Anyhow, I was able to override Button.OnPaint( ) and use
ControlPaint.DrawBorder( ) to eliminate
this ForeColor border on every button. Basically, I draw over it with the
form background color.
Now, I'm down to just figuring out how to eliminate the focus
rectangle/border on the button with focus.
I've tried ControlPaint.DrawFocusRectangle, but no luck.
Regards, Jeff
""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
news:QmIO6w0tEHA.592@cpmsftngxa10.phx.gbl...
> Hi Jeff,
>
> Thanks for your posting!
>
> Yes, I have reproduced out this issue. Actually, the border will only use
> the forecolor to draw it when the button has focus.
> This is by design. Does this affect you much, and you have concern on it?
>
> Thank you for your patience and cooperation. If you have any questions or
> concerns, please feel free to post it in the group. I am standing by to be
> of assistance.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>