How do i change the forecolor of a command button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhayasthana2006
    New Member
    • Apr 2007
    • 2

    How do i change the forecolor of a command button

    can anybody tell me how to change the forecolour of a command button.

    Regards
    abhay
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    Go to Project - Components

    Select Sheridan Active Threed Controls.

    Use Sheridan button instead to change fore color.

    Good Luck.

    Comment

    • tristanlbailey
      New Member
      • Apr 2007
      • 30

      #3
      That doesn't sound like a commonplace ActiveX control. It may only exist on computers with a particular program installation.

      There is no ForeColor property for command button controls. There is an article that discusses how to create the effect of another label placed directly over a command control, with forecolour support.



      This code is lengthy, and I personally would not use it myself. A simple alternative is to create a picture of your own with text included for the command button; assign the picture to the command button's Picture property; set the Style property to "1 - Graphical"; and make sure that the Caption property is set to null (not used). You may also wish to assign a picture to the button's DownPicture property, which becomes visible when the command button is depressed/pushed down.

      Comment

      • iburyak
        Recognized Expert Top Contributor
        • Nov 2006
        • 1016

        #4
        Originally posted by tristanlbailey
        That doesn't sound like a commonplace ActiveX control. It may only exist on computers with a particular program installation.

        There is no ForeColor property for command button controls. There is an article that discusses how to create the effect of another label placed directly over a command control, with forecolour support.



        This code is lengthy, and I personally would not use it myself. A simple alternative is to create a picture of your own with text included for the command button; assign the picture to the command button's Picture property; set the Style property to "1 - Graphical"; and make sure that the Caption property is set to null (not used). You may also wish to assign a picture to the button's DownPicture property, which becomes visible when the command button is depressed/pushed down.
        Why bother reinventing a wheel?
        As I said above he can use Sheridan button instead that has this functionality.

        Comment

        • tristanlbailey
          New Member
          • Apr 2007
          • 30

          #5
          Originally posted by iburyak
          Why bother reinventing a wheel?
          As I said above he can use Sheridan button instead that has this functionality.
          Could you please provide a link to the where-abouts of this particular ActiveX control that you speak of, so that he may download it? My first statement still stands.

          Comment

          • vijaydiwakar
            Contributor
            • Feb 2007
            • 579

            #6
            Originally posted by abhayasthana200 6
            can anybody tell me how to change the forecolour of a command button.

            Regards
            abhay
            for that use form2's componants

            Comment

            • iburyak
              Recognized Expert Top Contributor
              • Nov 2006
              • 1016

              #7
              Originally posted by tristanlbailey
              Could you please provide a link to the where-abouts of this particular ActiveX control that you speak of, so that he may download it? My first statement still stands.

              See my first two lines it is included with VB. No download required.


              [PHP]Go to Project - Components

              Select "Sheridan Active Threed Controls".[/PHP]

              I don't think there is any point to continue this discussion because abhayasthana200 6 doesn't look to be interested in it any more.

              Comment

              • tristanlbailey
                New Member
                • Apr 2007
                • 30

                #8
                Originally posted by iburyak
                See my first two lines it is included with VB. No download required.


                [PHP]Go to Project - Components

                Select "Sheridan Active Threed Controls".[/PHP]

                I don't think there is any point to continue this discussion because abhayasthana200 6 doesn't look to be interested in it any more.
                Hmm... just researched your control. Averages $130 to buy, options for 20 day evaluations... definately not something that comes with VB.

                ActiveThreed Plus from Infragistics, Inc.; product and pricing information at Xtras.Net


                I wonder how you ever came across it...

                Comment

                • pongscript
                  New Member
                  • Mar 2007
                  • 27

                  #9
                  simple use API... use changecolor and getcolor function, i cant giv you exactly the code was but i use api to untie the vb limits...follow the steps below..

                  1. Use FindWindow and FindWindowEx to Get the handle of your button
                  2. Use GetColor() to get specific Color of your taste
                  3. Us SetColor to Change the forecolor of your button... just make sure you find the text not the main button object and make sure you pick the right color or you all see is black..or maybe white..

                  Comment

                  Working...