Command Button Backcolor 
Author Message
 Command Button Backcolor

Hi, I posted this question last Friday but it didn't seem to arrive
- or was expired sometime over the weekend.

My problem is with setting the Backcolor property on the Command
Button control.  It doesn't seem to be having any effect.  I've tried
both using the properties box at design time and assigning a value at
run time with no success?

Is this a bug (I haven't seen it on the bug list at Microsoft.com) or
is there something I missed in the documentation?  I'm using VB 4.0
professional.

Would appreciate any help.

Thanks

Greg Perry



Sat, 20 Mar 1999 03:00:00 GMT  
 Command Button Backcolor



Quote:

> My problem is with setting the Backcolor property on the Command
> Button control.  It doesn't seem to be having any effect.  I've tried
> both using the properties box at design time and assigning a value at
> run time with no success?

> Is this a bug (I haven't seen it on the bug list at Microsoft.com) or
> is there something I missed in the documentation?  I'm using VB 4.0
> professional.

I use vb3 and the standard command btn  is limited to grey background and a
single line of text I assuming it hasn't changed with vb4.  Changing the
background color will have no effect although changing the system colors
will if you leave the background color at its default.  See knowledge base
q140884 for a work around that uses a picture box.

Sean giles



Sat, 20 Mar 1999 03:00:00 GMT  
 Command Button Backcolor


Quote:

> Hi, I posted this question last Friday but it didn't seem to arrive
> - or was expired sometime over the weekend.

> My problem is with setting the Backcolor property on the Command
> Button control.  It doesn't seem to be having any effect.  I've tried
> both using the properties box at design time and assigning a value at
> run time with no success?

> Is this a bug (I haven't seen it on the bug list at Microsoft.com) or
> is there something I missed in the documentation?  I'm using VB 4.0
> professional.

> Would appreciate any help.

> Thanks

> Greg Perry

If you set BackColor to black, the dotted retangular araound the label of
the button disappears if the butoon has the focus. I found this be
experience.

Joachim Michely, Steinkaule 50, 53757 St-Augustin, Germany

CompuServe : 100024,2476



Mon, 22 Mar 1999 03:00:00 GMT  
 Command Button Backcolor

While it appears that you can set the background color of a command button,
you can't.  That's determined by the Windows Control Panel, just like all
colors in Windows.  Strange, huh?



Quote:
> Hi, I posted this question last Friday but it didn't seem to arrive
> - or was expired sometime over the weekend.

> My problem is with setting the Backcolor property on the Command
> Button control.  It doesn't seem to be having any effect.  I've tried
> both using the properties box at design time and assigning a value at
> run time with no success?

> Is this a bug (I haven't seen it on the bug list at Microsoft.com) or
> is there something I missed in the documentation?  I'm using VB 4.0
> professional.

> Would appreciate any help.

> Thanks

> Greg Perry



Mon, 22 Mar 1999 03:00:00 GMT  
 Command Button Backcolor


Quote:

>While it appears that you can set the background color of a command button,
>you can't.  That's determined by the Windows Control Panel, just like all
>colors in Windows.  Strange, huh?

Actually, you can set it just fine.

The problem is that the main color of a command button is not
its background color.  If I recall correctly, the BackColor in
VB3 controls the four pixels at the corners, and in VB4, *nothing*
The property is retained just for compatibility.

If you want something that works like a command button and
isn't the _user_chosen_[1] button color, then you'll have to
use a different control.

     Bob O`Bob

[1] OK, so most users don't _actively_ choose system colors, they
just accept them.  But it's still _user_ choice.
--



Mon, 22 Mar 1999 03:00:00 GMT  
 Command Button Backcolor

You can't do it with the standard VB command button control.
--
___________________________________________________________________
           _________              ________
          /  __    /\            /\_______\          
         /  /_/   / /           / /  _____/
        /     ___/ /           / /  /__\
       /  /\  \ \_/           / /  ____/
      /__/ /\  \ \           / /  /
      \__\/  \__\/ E M O     \/__/ R A N C E S C H E L L I


   Istituto Tecnico Industriale Aldini Valeriani - IIIA/Info
___________________________________________________________________    



Quote:
> Hi, I posted this question last Friday but it didn't seem to arrive
> - or was expired sometime over the weekend.

> My problem is with setting the Backcolor property on the Command
> Button control.  It doesn't seem to be having any effect.  I've tried
> both using the properties box at design time and assigning a value at
> run time with no success?

> Is this a bug (I haven't seen it on the bug list at Microsoft.com) or
> is there something I missed in the documentation?  I'm using VB 4.0
> professional.

> Would appreciate any help.

> Thanks

> Greg Perry



Tue, 23 Mar 1999 03:00:00 GMT  
 Command Button Backcolor

We just covered that in class last week; yes, that is a bug that was left
over from the previous version of VB.



Quote:

> My problem is with setting the Backcolor property on the Command
> Button control.  It doesn't seem to be having any effect
> Is this a bug ?  I'm using VB 4.0 professional.



Sat, 03 Apr 1999 03:00:00 GMT  
 Command Button Backcolor

VB does not have bugs.  It's a FEATURE!                 :-P


  >We just covered that in class last week; yes, that is a bug that was left
  >over from the previous version of VB.



  >>
  >> My problem is with setting the Backcolor property on the Command
  >> Button control.  It doesn't seem to be having any effect
  >> Is this a bug ?  I'm using VB 4.0 professional.



Sat, 03 Apr 1999 03:00:00 GMT  
 Command Button Backcolor


Please remove "comp.lang.basic.visual" from distribution of this thread.
The newsgroup is DEAD!

Quote:
> We just covered that in class last week; yes, that is a bug that was left
> over from the previous version of VB.

No, it is not a bug, it is one of the smartest things the developers of VB
ever did.

The background color of a command button is defined in Control Panel (those
that were shocked are asked to leave the room now). I don't want every
other program have a button background color that the PROGRAMMER liked more
than any other color - I want buttons to have the color _I_ like, and only
that color.

It's called a standard (those that were shocked are asked to leave the room
now), and should be reinforced.

It is NOT a bug, it was intent, and I feel sorry for those that follow your
classes.

--
VB Info: http://home.sn.no/~balchen/vb/visual.htm
FAQ: http://home.sn.no/~balchen/vb/faq.htm
Knowledge Base: http://home.sn.no/~balchen/vb/kb.htm



Sat, 03 Apr 1999 03:00:00 GMT  
 Command Button Backcolor

I agree 100%. The fact that you cannot change the background color is
good. Actually, if you think about it, the color you are talking about
is really the foreground color of the button (not the text foreground
color). Also, the fact that there is a background color property is not
an error either. There are 4 pixels on a button that show the background
color. Try this as a test. Place the background color of a form to
black. Insert a button. Look close at the corners. In an attempt to show
the button corners as rounded, MS has made the 4 corner pixels show
another color - voila... the background color.

Dan



Sat, 03 Apr 1999 03:00:00 GMT  
 Command Button Backcolor

Hello, Mr. Balchen.

Again, Bravo!

Ed
----------------------------------------------------
Knowledge is of two kinds. We know a subject ourselves, or we know where
we can find information upon it. -- Samuel Johnson, 1775
----------------------------------------------------
Edmund Jimenez

---------------------------------------------------



Sun, 04 Apr 1999 03:00:00 GMT  
 Command Button Backcolor

Don't forget that under Win 95 & NT, some properties are declared
globally (look at properties of desktop)




Tue, 06 Apr 1999 03:00:00 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Command Button Backcolor (VB3)

2. Visual Basic 4.0 - 2 Questions - Command Button Backcolor, Public Statement

3. Command button BackColor

4. can't change command button backcolor

5. backcolor command button problem

6. BackColor of Command button

7. How to change backcolor for Command Buttons

8. Wordwrap and BackColor in Command Buttons?

9. BackColor Property on Command Button

10. Backcolor of Command-Button

11. Setting Backcolor on Command Buttons

12. Setting Backcolor on Command Buttons

 

 
Powered by phpBB® Forum Software