How the font color of commnd button cation is changed? In properties no such method found. Anyclue.
Printable View
How the font color of commnd button cation is changed? In properties no such method found. Anyclue.
Easy way is to change the buttons Style property to Graphical but then you will lose any XP / Vista theming.
thanks for the reply. I am using the style property as Graphical and inserted picture, so I want to change the font color of the caption from black to blue or anyother suitable color.
Sorry it should be an Option Button and set its Forecolor property with the Style being graphical.
See "Setting A Command buttons Forecolor on this link" Change Command Button Forecolor
Or you could use Threed32.ocx its on the VB6 CD. You can set the button Forecolor to any colour or shade you want too.
You know this ocx has some really good controls and properties, its a pity people don't use it now, I do. ;)
Edit: Just thinking about it you could add pictures/icons to Command buttons 13 years ago with Threed16.ocx and Threed32.ocx. I can't remember if you could add them in VB5, its been a long time since I've used that. :rolleyes:
I never seen that control. Where is the path location for it?
Rob: its in Common\Tools\Vb\Controls. There areQuote:
Originally Posted by RobDog888
Anibtn32.ocx for make animated buttons.
Dbgrid32.ocx which is an earlier version of the current Dbgrid32.
Gauge32.ocx where you can simulate different gauges, you just have to make you own pictures for the gauge background.
Graph32.ocx the earlier graph making control.
Grid32.ocx is the earlier version of MSFlxGrd.
Keysta32.ocx shows if the Caps Lock, Num Lock and I think Scroll Lock are switches on graphically.
Mschart.ocx the earlier graph making control.
Msoutl32.ocx I think it shows a Explorer type layout with folders and files.
Spin32.ocx is the earlier version of the current Up/Down control.
Threed32.ocx has the normal VB controls, Frame, Command button, Option button, Checkbox with an addition of Panel. All these controls have additional features like coloured button captions.
These are the older ActiveX controls that VB used to use.
You register these ocx's as normal in the Win\Sys folder then in the Controls folder there are 3 reg files what will give extra registration needed for these files, dbgrid.reg, mschart.reg and the important one vbctrls.reg. Without this last reg you won't get the controls loaded initially.
As I've said I don't know why some of these controls are used anymore.
If you want an app that will show these controls working then have a look Old Visual Basic OCX Demo that I made 3 years ago. ;)
I've created a button control that allows you to change ForeColor. It also has a Flat property so you can create Toolbar like buttons, it also has a DrawFocusRect property which if set to False doesn't draw the focus rectangle when the button has the focus. It can display an image either to the left of the text or above it (just set the TextAlignment property, this property is ignored if the Picture property is not set). To keep it simple I haven't implemented any MaskColor property so use icons if you want transparent images.
Besides the above it works pretty much like the regular CommandButton and expose the same events (for which of course the Click event is the most important). It supports the Default and Cancel properties and it also expose a Click method which will raise the Click event when called.
The UserControl is a pure user-drawn control (it doesn't contain any other controls, everything is drawn in the Paint event) so it's very light-weight. I have included it in an ActiveX Control project so you can compile it to an OCX if you like, but you can just as well simply include the UserControl directly into your Standard EXE file if you don't want to distribute another OCX file with your project.
http://www.vbforums.com/attachment.p...1&d=1196901732
Top notch work Joacim :thumb: