Discussion Locked

Color Buttons for VB6

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
While I am learning to convert my projects to vb.net, I must still improve the VB6 ones. I need a button control that will allow me to change the color of both the forground and the background. Can someone tell me where I can get that capability. Also, it would be nice if the buttons looked like .net ones.

1 reply

by rthomas

Hello,

There may be other ways, but here is what I did:

1. Change the button control to a checkbox control.
2. Change the checkbox's style to Graphical.
3. You can now change fore/back colors.
4. I found it best to handle the MouseUp event rather than Click.
5. You have to "unclick" the checkbox in code by setting its Value property to False, or else it stays pushed in.

Hope this helps!

This discussion is closed to new replies.