Does anyone know on how to change the font colour in a command button?
Any help will be great.....
thanx in advance
Printable View
Does anyone know on how to change the font colour in a command button?
Any help will be great.....
thanx in advance
go to command button property
And use style asNow cahnge font is displayes on the command buttonVB Code:
1-Graphical
To Change the Font Color You Need to Use the CommandButton1 Control in "Microsoft Forms 2.0 Object Library" in the Components.
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 COMMENTQuote:
Originally Posted by Simply Me
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 propertyQuote:
Originally Posted by shakti5385
setup the graphic like you do with all objects...but remember to set that graphic thing.
Shakti what is being asked is how to change the font color not font style
with using we can do it withVB Code:
Microsoft Forms 2.0 Object Library
using post 2 and 5
Actually there's no graphical property for Microsoft Forms 2.0 Object LibraryQuote:
Originally Posted by shakti5385
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
why using without using u can do it there is no need for itQuote:
Actually there's no graphical property for Microsoft Forms 2.0 Object Library
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"
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
ok shakti5385, i wonder how you do it without api.
Its Enough Yaar
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:
Private Sub Check1_Click() If Check1.Value = vbChecked Then Check1.Value = vbUnchecked ' Code for 'Button' Click event End If End Sub
Or you can use Threed32.ocx that will change the button ForeColor easy. ;)Quote:
Originally Posted by binilmb
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.
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.Quote:
Originally Posted by binilmb
Change Command Button Forecolor
that's just a similar example of what I posted Hack,
did you mean: WM_DRAWITEM: Set Command Button ForeColor
Oops. :blush: Didn't see it.Quote:
Originally Posted by bushmobile
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...
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.
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 :wave:
Greyskull
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.