Results 1 to 25 of 25

Thread: [RESOLVED] Command Button Font

  1. #1

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Resolved [RESOLVED] Command Button Font

    Does anyone know on how to change the font colour in a command button?

    Any help will be great.....

    thanx in advance
    Last edited by Hack; Jun 5th, 2006 at 10:32 AM. Reason: Added [RESOLVED] to thread title and green "resolved" checkmark

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Command Button Font

    go to command button property

    And use style as
    VB Code:
    1. 1-Graphical
    Now cahnge font is displayes on the command button

  3. #3
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Command Button Font

    To Change the Font Color You Need to Use the CommandButton1 Control in "Microsoft Forms 2.0 Object Library" in the Components.
    ßįňįl

  4. #4
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Command Button Font

    I think you cannot change the font color that way shakti
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  5. #5
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: Command Button Font

    Quote Originally Posted by Simply Me
    I think you cannot change the font color that way shakti
    FOR CHANGING FONT COLOUR COMMAND BUTTON SYYLE IS 1-GRAPHICAL IS NECESSARY OTHER WISE CHANGE COLOUR NOT DISPLAYES ON BOTTON CHECK IT URSELF BEFOR COMMENT

  6. #6
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Command Button Font

    Quote Originally Posted by shakti5385
    FOR CHANGING FONT COLOUR COMMAND BUTTON SYYLE IS 1-GRAPHICAL IS NECESSARY OTHER WISE CHANGE COLOUR NOT DISPLAYES ON BOTTON CHECK IT URSELF BEFOR COMMENT
    You check it yourself Shakti. That wont work. binilmb is right you have to use Microsoft Forms 2.0 Object Library and change color using forecolor property
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  7. #7
    Addicted Member
    Join Date
    Apr 2006
    Location
    Sweden
    Posts
    173

    Re: Command Button Font

    setup the graphic like you do with all objects...but remember to set that graphic thing.
    Please Help Us To Save Ana

    You never fail before you stop trying!
    ______________________________
    If I manage to say something good...please reputate
    ______________________________
    ________

    Links:
    Intellithing
    Digitala.nu
    Norrköpings Goklubb
    WoW Trade Center

  8. #8
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Command Button Font

    Shakti what is being asked is how to change the font color not font style
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  9. #9
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Command Button Font

    VB Code:
    1. Microsoft Forms 2.0 Object Library
    with using we can do it with

    using post 2 and 5

  10. #10
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Command Button Font

    Quote Originally Posted by shakti5385
    VB Code:
    1. Microsoft Forms 2.0 Object Library
    with using we can do it with

    using post 2 and 5
    Actually there's no graphical property for Microsoft Forms 2.0 Object Library
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  11. #11
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Command Button Font

    There is no Style Property for CommandButton1 in "Microsoft Forms 2.0 Object Library". There is Font "ForeColor" Property with Which you can change the Font Color
    ßįňįl

  12. #12
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Command Button Font

    Actually there's no graphical property for Microsoft Forms 2.0 Object Library
    why using without using u can do it there is no need for it

  13. #13
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Command Button Font

    hello shakti5385
    can u please explain how to change the font color of "Command1" button in vb and i don't want to use the CommandButton1 from "Microsoft Forms 2.0 Object Library"
    ßįňįl

  14. #14
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Command Button Font

    add a commanf button at ur form

    change it's style as graphical from properties

    and now change the back colour

    soory in this way we are not able to cahnge font colour but we are able to cahnge the

    back colour of command button


    soory for mistake

    i was confused

    thanks all for solving my comfusion

  15. #15
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Command Button Font

    ok shakti5385, i wonder how you do it without api.
    ßįňįl

  16. #16
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Command Button Font

    Its Enough Yaar

  17. #17
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Command Button Font

    shakti5385 was close - just the wrong control

    use a checkbox. Set it's style to Graphical and then you have control over forecolor. Just remember to have something like this in the click event:
    VB Code:
    1. Private Sub Check1_Click()
    2.     If Check1.Value = vbChecked Then
    3.         Check1.Value = vbUnchecked
    4.        
    5.         ' Code for 'Button' Click event
    6.    
    7.     End If
    8. End Sub

  18. #18
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Command Button Font

    Quote Originally Posted by binilmb
    To Change the Font Color You Need to Use the CommandButton1 Control in "Microsoft Forms 2.0 Object Library" in the Components.
    Or you can use Threed32.ocx that will change the button ForeColor easy.

    There are a lot of nice features of Threed32.ocx, its a pitting it isn't used that much.

    Its on the VB6 CD, do a search.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  19. #19
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Command Button Font

    Quote Originally Posted by binilmb
    ok shakti5385, i wonder how you do it without api.
    You don't do it without API....if fact, you have to subclass the entire control to do it. The same thing is required for changing the Backcolor, only, Microsoft did all of that work for you, but, not for the ForeColor.

    Change Command Button Forecolor

  20. #20

  21. #21
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Command Button Font

    Quote Originally Posted by bushmobile
    that's just a similar example of what I posted Hack,

    did you mean: WM_DRAWITEM: Set Command Button ForeColor
    Oops. Didn't see it.

  22. #22

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Resolved Re: Command Button Font [resolved]

    thanks shakti5385...it worked! i found the commandbutton control in obj library...im now able to change the font colour and make the button transparent...

  23. #23
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Command Button Font

    If you wouldn't mind clearing this up for me - what method are you using? the commandbutton in Forms 2.0 Object Library?

    If so, be aware that the Microsoft Form2 2.0 Object Library is non-redistributable, and you can not include it in an installation package. It comes with MSOffice and if MSOffice is not installed then it will not work.

    There is some way of getting round it - i'll see if i can find it.

  24. #24

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: [RESOLVED] Command Button Font

    sorz for not making it clear....

    ive used the command button control in the Microsoft Form 2.0 Object Library

    i was able to change its font colour using the Forecolour option in the properties

    thanx for d advice tho...i wont prob need to redistribute it to other computr but if u can tell me how to then it'll be great

    thanx in advance

    Greyskull

  25. #25
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: [RESOLVED] Command Button Font

    Found it.

    Here's the info about Fm20.dll (that's the dll in question) - there's a link from there to the Microsoft ActiveX Control Pad which is free and fm20.dll is part of the install.

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