|
-
Jun 3rd, 2001, 08:08 PM
#1
Thread Starter
Member
command buttons...
i know that its possible to change the command button's background color by changing the style to graphical, but is it possible to change the command buttons forecolor? any posts are appreciated. thanks.
p.s.-i've always wondered what MaskColor is used for ... can someone explain that?
-
Jun 4th, 2001, 01:33 AM
#2
Registered User
Why not use a CheckBox control?
You can set its Style property to Graphical,
and it will look like a Command Button.
That way you can change the ForeColor Just add this bit of code:
Private Sub Check1_Click()
Check1.Value = vbUnChecked
End Sub
This is the lightweight solution, but you can also:
Use the Microsoft Forms 2 controls which has a command button that the text color can be changed on.
Or subclass the button to do it.
-
Jun 4th, 2001, 08:09 AM
#3
Lively Member
here's
No, you can't change buttons' forecolor, but for 'Maskcolor' properties, it's used when you apply a graphic style on the button : If you want the picture to be transparent, you select the maskcolor and you put True to 'UseMaskColor' Property.
All what you dream is codable - DevMaX
-
Jun 4th, 2001, 08:44 AM
#4
Registered User
Don't talk riddles! Sure you can!!!
http://www.mvps.org/vbnet/code/subcl...ttoncolour.htm
there's an example of how implementing it into normal command buttons.
-
Jun 4th, 2001, 08:47 AM
#5
Registered User
-
Jun 4th, 2001, 01:55 PM
#6
Thread Starter
Member
thanks everyone for posting.
i prefer nucleus's idea because the api calls are long, and id rather just use a vb control than adding all that code(not that its *that* long)which would make the program size bigger, vb runs slow enough as it is, heh.
-
Jun 6th, 2001, 01:39 PM
#7
Registered User
the code is small if you remove all the comments and apis are the fastest way of getting around and have nothing to do with vb as everybody's using them with c++ as well
-
Jun 6th, 2001, 03:18 PM
#8
There's a button in Microsoft Form Controls 2.0 that let's you do this.
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
|