DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Command Button

  1. #1
    ss Guest

    Command Button


    How can i change the text color on the command button?


  2. #2
    Al Guest

    Re: Command Button


    "ss" <smintell@yahoo.com> wrote:
    >
    >How can i change the text color on the command button?
    >



    I don't think you can change the text color on the command button, but a
    good work-a-round is to use either a picture box or an image control.

    I have used the image control and created TextArt in a program like WordPerfect,
    MS Word, PhotoShop, etc. and then loaded the TextArt file into the image
    control.

    You might try this and see if you like it. Just make you image control the
    same size as you would make your command button and no one will know the
    difference.

    Good Luck

  3. #3
    Dave Keighan Guest

    Re: Command Button

    Hi ss

    > How can i change the text color on the command button?


    Go to Randy Birch's site and have a look at:
    http://www.mvps.org/vbnet/index.html...ttoncolour.htm

    --
    Dave Keighan

  4. #4
    Rick Rothstein Guest

    Re: Command Button

    A better work around is to use a CheckBox (YES a CheckBox). Turn its Style property to 1
    (Graphical) and put

    If Check1.Value = vbChecked Then
    Check1.Value = vbUnchecked
    ' .......
    ' Put your Click Event code here
    ' .......
    End If

    in the its Click event (using your own control name instead of Check1 of course).

    It will now function just like a regular Command Button (except it can't be a "default"
    button) but you can now change it ForeColor and BackColor. If you leave the Check1.Value =
    vbUnchecked out, the button becomes "sticky", that is it stays down when clicked and pops
    back up again only when clicked again.

    Rick


    " Al" <Nolalaw@aol.com> wrote in message news:3c5a3572$1@10.1.10.29...
    >
    > "ss" <smintell@yahoo.com> wrote:
    > >
    > >How can i change the text color on the command button?
    > >

    >
    >
    > I don't think you can change the text color on the command button, but a
    > good work-a-round is to use either a picture box or an image control.
    >
    > I have used the image control and created TextArt in a program like WordPerfect,
    > MS Word, PhotoShop, etc. and then loaded the TextArt file into the image
    > control.
    >
    > You might try this and see if you like it. Just make you image control the
    > same size as you would make your command button and no one will know the
    > difference.
    >
    > Good Luck



  5. #5
    ss Guest

    Re: Command Button


    Thank you.
    Great

    "Rick Rothstein" <rick_newsgroup@email.com> wrote:
    >A better work around is to use a CheckBox (YES a CheckBox). Turn its Style

    property
    >to 1
    >(Graphical) and put
    >
    >If Check1.Value = vbChecked Then
    > Check1.Value = vbUnchecked
    > ' .......
    > ' Put your Click Event code here
    > ' .......
    >End If
    >
    >in the its Click event (using your own control name instead of Check1 of

    course).
    >
    >It will now function just like a regular Command Button (except it can't

    be a "default"
    >button) but you can now change it ForeColor and BackColor. If you leave

    the Check1.Value
    >=
    >vbUnchecked out, the button becomes "sticky", that is it stays down when

    clicked and
    >pops
    >back up again only when clicked again.
    >
    >Rick
    >
    >
    >" Al" <Nolalaw@aol.com> wrote in message news:3c5a3572$1@10.1.10.29...
    >>
    >> "ss" <smintell@yahoo.com> wrote:
    >> >
    >> >How can i change the text color on the command button?
    >> >

    >>
    >>
    >> I don't think you can change the text color on the command button, but

    a
    >> good work-a-round is to use either a picture box or an image control.
    >>
    >> I have used the image control and created TextArt in a program like WordPerfect,
    >> MS Word, PhotoShop, etc. and then loaded the TextArt file into the image
    >> control.
    >>
    >> You might try this and see if you like it. Just make you image control

    the
    >> same size as you would make your command button and no one will know the
    >> difference.
    >>
    >> Good Luck

    >



  6. #6
    Dave Keighan Guest

    Re: Command Button

    Hi ss

    > How can i change the text color on the command button?

    Just picked up this info/trick in microsoft.public.vb.general.discussion
    where Don Brunner posted to "Text Colour Of A Button" ...

    Add a checkbox to a form, set it's style to graphical, it's forecolor to
    whatever you want

    add this line to the click event;
    Private Sub Check1_Click()
    Check1.Value = vbUnchecked
    '*** Your Code Goes Here ***
    End Sub

    Bit of a cludge but the fastest way to a *button's* forecolor

    --
    Dave Keighan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center