Results 1 to 8 of 8

Thread: command buttons...

  1. #1

    Thread Starter
    Member choochoo's Avatar
    Join Date
    Jun 2001
    Posts
    51

    Arrow 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?

  2. #2
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    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.

  3. #3
    Lively Member devmax's Avatar
    Join Date
    Mar 2001
    Posts
    67

    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

  4. #4
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Thumbs up 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.

  5. #5
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

  6. #6

    Thread Starter
    Member choochoo's Avatar
    Join Date
    Jun 2001
    Posts
    51
    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.

  7. #7
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252
    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

  8. #8
    Megatron
    Guest
    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
  •  



Click Here to Expand Forum to Full Width