473,385 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

BackColor - Not ?

Rob
This should be simple.....

The default BackColor of a button (if you look at its property) is "Control"
its a gray color, but apparently not a color.

During a process I set the BackColor of a button to another color by
using....

Me.Button.BackColor = Color.Yellow

At a later point I want to return it to its original "color"....

How do I specify "Control" as a "color" ?

You cannot do...

Me.Button.BackColor = Color.Control
or
Me.Button.BackColor = Control

Thanks !


May 30 '07 #1
4 7868
Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)
"Rob" <ro***@yahoo.comwrote in message
news:lc******************************@comcast.com. ..
This should be simple.....

The default BackColor of a button (if you look at its property) is
"Control" its a gray color, but apparently not a color.

During a process I set the BackColor of a button to another color by
using....

Me.Button.BackColor = Color.Yellow

At a later point I want to return it to its original "color"....

How do I specify "Control" as a "color" ?

You cannot do...

Me.Button.BackColor = Color.Control
or
Me.Button.BackColor = Control

Thanks !


May 30 '07 #2
"Ray Cassick" <rc******@enterprocity.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)
Easier to use this.BackColor = SystemColors.Control

Michael
May 30 '07 #3
Rob
Thanks Ray !

"Ray Cassick" <rc******@enterprocity.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)
"Rob" <ro***@yahoo.comwrote in message
news:lc******************************@comcast.com. ..
>This should be simple.....

The default BackColor of a button (if you look at its property) is
"Control" its a gray color, but apparently not a color.

During a process I set the BackColor of a button to another color by
using....

Me.Button.BackColor = Color.Yellow

At a later point I want to return it to its original "color"....

How do I specify "Control" as a "color" ?

You cannot do...

Me.Button.BackColor = Color.Control
or
Me.Button.BackColor = Control

Thanks !



May 30 '07 #4
"Michael C" <no****@nospam.comschrieb:
>Me.Button.BackColor = Color.FromKnownColor(KnownColor.Control)

Easier to use this.BackColor = SystemColors.Control
I'd recommend that too. In addition it may be useful to store the old value
in a private variable (or similar) and assign its value to the property
later.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

May 30 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: perspolis | last post by:
HI I created a user control and place some control on it. I need when I change BackColor of user control,Back Color of other controls also change.. I used foloowing code: public override Color...
6
by: LU | last post by:
A)I build a datagrid based on a calendar date selection. B)When user clicks a button column on the datagrid I want to highlight this row. I use the code below to highlight the row. ***** CODE...
1
by: Firewalker | last post by:
I am attempting to change the backColor property on the previously instantiated buttons FROM a listbox_doubleClick event. I thought it would be something like this: If...
4
by: ray well | last post by:
in my app i need to make a RichTextbox control transparent. i need it to be a like a pane of glass lying on a sheet of paper, where u can see everything on the sheet of paper not covered by text...
3
by: senfo | last post by:
I developed a Windows control in VS 2005 that inherits from the PictureBox Control that adds the ability to select images in a Windows application. It is, however, experiencing a strange issue...
0
by: Wolfgrin | last post by:
Hi, I have set up a report In Access 2003 where there are 2 check boxes I refer to to change the color of the Date of that record. That part is working. I also need to Change the color of the...
6
by: Dmitry Duginov | last post by:
Hi, I have the following label markup (label is inside FormView): <asp:Label ID="lblIndicatorReady" runat="server" Text="RE" ToolTip="Ready" BackColor='<%#...
11
by: tshad | last post by:
I have a Windows form where I am trying to set the BackColor of a control and check the color before I do it: If control.BackColor = System.Drawing.Color.Blue Then ChangeColor(control,...
5
by: Rob | last post by:
Hi, I'am working with vb2005 and it's an ADO application based on an access database. i'am still have problems to get the backcolor of an control in a different color if it has the focus. I am...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.