|
-
Jan 29th, 2001, 09:05 PM
#1
Thread Starter
PowerPoster
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!)
"It's cold gin time again ..."
Check out my website here.
-
Jan 29th, 2001, 09:08 PM
#2
save yourself an API call by using the command button under the "Forms 2.0 Library" component...
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 29th, 2001, 09:32 PM
#3
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
-
Jan 29th, 2001, 09:33 PM
#4
Matthew, wouldn't it be easier to use my method, you know...save yourself some code??
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 29th, 2001, 09:48 PM
#5
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.
-
Jan 29th, 2001, 09:49 PM
#6
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 29th, 2001, 09:54 PM
#7
The picture isn't missing
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
??????
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jan 29th, 2001, 09:58 PM
#8
_______
<?>
'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
Last edited by HeSaidJoe; Jan 29th, 2001 at 10:01 PM.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jan 29th, 2001, 10:01 PM
#9
The picture isn't missing
they did the same thing .... they messaged box twice
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jan 29th, 2001, 10:04 PM
#10
The picture isn't missing
this works
If Check1.Value = vbChecked Then
Check1.Value = vbUnchecked
MsgBox "help"
End If
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jan 29th, 2001, 10:09 PM
#11
Yup, BuggyProgrammer has the correct idea, I did the same exact thing for the Binary Encrypt/Decryptor I made a while ago.
-
Jan 30th, 2001, 06:48 AM
#12
Thread Starter
PowerPoster
Thanks a lot for all of your responses, guys. The checkbox thing works fine. I appreciate it.
"It's cold gin time again ..."
Check out my website here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|