Results 1 to 14 of 14

Thread: Talk about a newbie question..

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    I don't believe I'm asking this (been doing vb for over a year now), but is there a way to change the forecolor/fontcolor on a command button? I seem to remember being able to do this a while aog, but I can't find it now?

    ------------------
    (`..`->ShadowCrawler<-`..)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: craigkovatch@compuserve.com
    ICQ#: 9872708

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Posts
    123

    Post

    Could it be object.forecolor = ???????
    the ? marks stand for those long alpha-numeric combinations used to represent colors.

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    Umm...not to be rude...but if it was that easy I wouldn't be posting

    (Draw a CommandButton and see..)

    ------------------
    (`..`->ShadowCrawler<-`..)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: craigkovatch@compuserve.com
    ICQ#: 9872708

  4. #4
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    I don't think you can change the fontcolor of command buttons, not unless you use API codes, because I believe it is set by Windows. But I could be wrong, I've only been doing this for about 6 months.

    ------------------
    Ryan


    [This message has been edited by Gimpster (edited 01-20-2000).]

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    I remember being able to do it long ago...maybe even when I was using VB5. I have no idea, was hoping someone would know. (Aaron?)

    ------------------
    (`..`->ShadowCrawler<-`..)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: craigkovatch@compuserve.com
    ICQ#: 9872708

  6. #6
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    Hi, there.
    Two ways to do it:
    1. Use Option button and change Style property to Graphical.
    2. Add Microsoft Forms 2.0 Object Library(it's in Components) and use Command button from there.

    Larisa

  7. #7
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Hi,
    Aaron just answered the same question today:

    http://www.vb-world.net/ubb/Forum1/HTML/013817.html

    Al.


    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:asmith3914@aol.com
    asmith@spxateg.com">asmith3914@aol.com
    asmith@spxateg.com</A>


  8. #8
    Lively Member
    Join Date
    Jul 1999
    Posts
    99

    Post

    change its style property first to vbGraphical then change the forecolor/backcolor properties.

  9. #9

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    I really wish half of you would check your answer before giving it...CommandButton's DO NOT HAVE a .ForeColor property.

    ------------------
    (`..`-&gt;ShadowCrawler&lt;-`..)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: craigkovatch@compuserve.com
    ICQ#: 9872708

  10. #10

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    I realize the idea with the checkbox now, I was hoping to do it with a normal commandbutton because I remember doing it in a program I made long ago. Oh well. Anyway, a bunch of people were saying 'change it's .ForeColor', assuming I was stupid enough not to check that :P

    ------------------
    (`..`-&gt;ShadowCrawler&lt;-`..)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: craigkovatch@compuserve.com
    ICQ#: 9872708

  11. #11
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    Hi.
    As I said before, add from components Microsoft Forms 2.0 Object Library. It will add new command button,that has forecolor property.

    Larisa

  12. #12

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    Thanks Larisa, I wasn't targeting you when I said that. My mian thing is avoiding more ActiveX controls, because I'm already using a bunch and it makes distribution and support really tough.

    ------------------
    (`..`-&gt;ShadowCrawler&lt;-`..)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: craigkovatch@compuserve.com
    ICQ#: 9872708

  13. #13
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    ShadowCrawler, he's not talking about the properties of a command button, he's talking about the properties of a check box, whose style is set to 1-Graphical. It's just how Aaron Young explained it in his other post.

    ------------------
    Ryan


    [This message has been edited by Gimpster (edited 01-21-2000).]

  14. #14
    Registered User
    Join Date
    Apr 1999
    Location
    Brazil
    Posts
    144

    Post

    My suggestion is not use Fm20.dll, this dll is incompatible with Visual Basic and causes errors! I say that 'cause I was using it and I got several messages errors then I cut out and became works fine.

    I suggest you to visit:
    www.vbxtras.com

    Jefferson

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