-
Is there an API that can be used to set the forecolor (for the text) of a command button? A Forecolor property is conspicuously absent from the command button's property list. (You can change the backcolor when the Style is set to Graphical, but no forecolor!)
-
save yourself an API call by using the command button under the "Forms 2.0 Library" component...
-
Place a Checkbox on the form and set it's Style to 1-Graphical.
And the results, you get a command button, where you can change the forecolor. Only thing is, the button stays clicked, but you can add this to it to unclick it.
Code:
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
Check1.Value = vbUnchecked
End If
End Sub
-
Matthew, wouldn't it be easier to use my method, you know...save yourself some code??
-
It'd take up less space.
Because he'd have to include the VB6 runtimes along with the Forms 2.0 Library component (whatever file that is).
I don't find using a checkbox a lot of code, it's simple and all you have to include are the VB6 runtime library files.
-
-
hey wouldnt't
Private Sub Check1_Click()
Check1.Value = vbUnchecked
End Sub
be easier than
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
Check1.Value = vbUnchecked
End If
End Sub
??????
-
<?>
'try this and see what happens
Code:
Private Sub Check1_Click()
MsgBox "help"
Check1.Value = vbUnchecked
End Sub
'or
Private Sub Check1_Click()
MsgBox "help"
If Check1.Value = vbChecked Then
Check1.Value = vbUnchecked
End If
End Sub
'seems Form2.0 is a better answer
-
they did the same thing .... they messaged box twice
-
this works
If Check1.Value = vbChecked Then
Check1.Value = vbUnchecked
MsgBox "help"
End If
-
Yup, BuggyProgrammer has the correct idea, I did the same exact thing for the Binary Encrypt/Decryptor I made a while ago.
-
Thanks a lot for all of your responses, guys. The checkbox thing works fine. I appreciate it.