Graphic Button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • News Central

    Graphic Button

    Hi All, I'm having a hard create a command button with a background in color
    other than "ButtonFace " and a foreground text in different color other than
    black. Is there a way to paint command buttons to have background in any
    color and foreground text in any other color.... thanks all.


  • Rick Rothstein

    #2
    Re: Graphic Button

    > Hi All, I'm having a hard create a command button with a background in
    color[color=blue]
    > other than "ButtonFace " and a foreground text in different color other[/color]
    than[color=blue]
    > black. Is there a way to paint command buttons to have background in any
    > color and foreground text in any other color.... thanks all.[/color]

    Setting the BackColor is easy... change the CommandButton's Style property
    to 1-Graphical.

    As for the ForeColor, that's not so easy. See these links...

    VBnet provides Intermediate and Advanced Win32 API code for VB developers. Comprehensive Code, FAQ, Developers Resources & News, alphabetical API/Type/Constant/Method Index, along with the largest Visual Basic-related links list on the net.


    VBnet provides Intermediate and Advanced Win32 API code for VB developers. Comprehensive Code, FAQ, Developers Resources & News, alphabetical API/Type/Constant/Method Index, along with the largest Visual Basic-related links list on the net.


    Rick - MVP


    Comment

    • Hajir Firooz

      #3
      Re: Graphic Button

      Hi, It is very simple:

      1- Open a project.
      2- Click on Project --> Components
      3- Under Controls tab, select Microsoft Forms 2.o Object Library
      4- Click on Apply
      5- Add a Command Button (from the new added controls) to your form and
      change the backcolor and fore color properties.

      Good luck,
      Hajir

      "News Central" <Bay@Bay.com> wrote in message
      news:QZOdnYUwQp CYmPPd4p2dnA@ba ytsp.com...[color=blue]
      > Hi All, I'm having a hard create a command button with a background in[/color]
      color[color=blue]
      > other than "ButtonFace " and a foreground text in different color other[/color]
      than[color=blue]
      > black. Is there a way to paint command buttons to have background in any
      > color and foreground text in any other color.... thanks all.
      >
      >[/color]


      Comment

      • Rick Rothstein

        #4
        Re: Graphic Button

        > Hi, It is very simple:[color=blue]
        >
        > 1- Open a project.
        > 2- Click on Project --> Components
        > 3- Under Controls tab, select Microsoft Forms 2.o Object Library
        > 4- Click on Apply
        > 5- Add a Command Button (from the new added controls) to your form and
        > change the backcolor and fore color properties.[/color]

        To the original poster... Don't Do This!

        To Hajir... You might want to read this

        INFO: Usage and Redistribution of FM20.DLL


        Rick - MVP



        [color=blue]
        > "News Central" <Bay@Bay.com> wrote in message
        > news:QZOdnYUwQp CYmPPd4p2dnA@ba ytsp.com...[color=green]
        > > Hi All, I'm having a hard create a command button with a background in[/color]
        > color[color=green]
        > > other than "ButtonFace " and a foreground text in different color other[/color]
        > than[color=green]
        > > black. Is there a way to paint command buttons to have background in any
        > > color and foreground text in any other color.... thanks all.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Hajir Firooz

          #5
          Re: Graphic Button

          Thanks Rick ... I am not a fan of using FM20.DLL but just thought it would
          be an easy way to have control on ForeColor. Once I had a problem with that
          dll while distributing my application I got Error 7 and I stopped using it.

          "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
          news:Ab-dnaaO6vw2vPPdRV n-tA@comcast.com. ..[color=blue][color=green]
          > > Hi, It is very simple:
          > >
          > > 1- Open a project.
          > > 2- Click on Project --> Components
          > > 3- Under Controls tab, select Microsoft Forms 2.o Object Library
          > > 4- Click on Apply
          > > 5- Add a Command Button (from the new added controls) to your form and
          > > change the backcolor and fore color properties.[/color]
          >
          > To the original poster... Don't Do This!
          >
          > To Hajir... You might want to read this
          >
          > INFO: Usage and Redistribution of FM20.DLL
          > http://support.microsoft.com/support.../Q224/3/05.ASP
          >
          > Rick - MVP
          >
          >
          >
          >[color=green]
          > > "News Central" <Bay@Bay.com> wrote in message
          > > news:QZOdnYUwQp CYmPPd4p2dnA@ba ytsp.com...[color=darkred]
          > > > Hi All, I'm having a hard create a command button with a background in[/color]
          > > color[color=darkred]
          > > > other than "ButtonFace " and a foreground text in different color other[/color]
          > > than[color=darkred]
          > > > black. Is there a way to paint command buttons to have background in[/color][/color][/color]
          any[color=blue][color=green][color=darkred]
          > > > color and foreground text in any other color.... thanks all.
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...