Results 1 to 18 of 18

Thread: Changing Font Color

  1. #1

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    Is there any way to change the font color on buttons? I need to change it to white...
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  2. #2
    Guest
    You can do it with subclassing, but it'll be much easier if you use the Button that is shipped with Sheridan 3D Controls.

  3. #3
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    actually, it would be much easier if you used the button shipped with microsoft office 97

    open the components box

    select microsoft forms 2.0 object library

    insert the command button from that library
    and hey presto, it has a forecolor property
    therefore allowing you to change the font color

    did this help you?

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You could do with a label, with a picturebox, image, anything, you could even make your own usercontrol for it.

    I wouldn't add add another control for the sake of colored font button.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Guest
    You don't have to use it just for the ForeColor. The button I referred to has some other features such as 3D text and heavy/light shadowing. In addition to that, there are other controls in the package that might be of use to you.

  6. #6

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    where can i get the Sheridan 3D Controls, I'll probably use the Micrsoft Office Buttons on this one, but i'm always looking for nifty new controls that i can convince the boss to buy, believe me i wouldn't even be messing with this if the end user didn't insist on silly blue buttons with white letters....
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  7. #7
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Originally posted by Megatron
    You don't have to use it just for the ForeColor. The button I referred to has some other features such as 3D text and heavy/light shadowing. In addition to that, there are other controls in the package that might be of use to you.
    sorry, i was just giving him the easiest solution for his problem, and didn't know that these sheridan controls were so "nifty"!

  8. #8
    Guest
    Add the file called Threed32.ocx to your components.

  9. #9

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    What about the liscensing info on Threed32.ocx?

    sorry, my parents were related, i can't think for myself
    or maybe it was that last beer...
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  10. #10
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    where can i find threed32.ocx?

  11. #11

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    Try this
    Open Project|Components then click browse , it should open to your windows system folder, double click on threed32.ocx you may also need to go to you Windows|System file in explorer and double click vbctrls to register it
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  12. #12
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Actually you can do it much simpler.

    Add a CheckButton
    Set it's sytle to Graphical

    Presto..you have a command button with backcolor/forecolor

    Trust me...you have to see this to believe it.

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  13. #13
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    pretty clever

  14. #14
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: <?>

    Originally posted by HeSaidJoe
    Actually you can do it much simpler.

    Add a CheckButton
    Set it's sytle to Graphical

    Presto..you have a command button with backcolor/forecolor

    Trust me...you have to see this to believe it.
    But a CheckBox doesn't act as a CommandButton.

  15. #15
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138
    That's what I thought when I got the same reply to this question (even form the same person if I remember well), but it really works.

    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

  16. #16
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    No it doesn't! It looks like a CommandButton but it doesn't act as a CommandButton!

  17. #17
    Guest
    But you can make it act like one with a little bit of code.
    Code:
    Private Sub Check1_Click()
        If Check1 = Checked Then Exit Sub
        
        Print "Button was pressed"
    End Sub
    
    Private Sub Check1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Check1 = Unchecked
    End Sub

  18. #18

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    i just wanted to change the button color and font, i've since decided it looked silly and went back to the same old Command button
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width