473,471 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Duplicate label + changing color

59 New Member
I've got two new problams : \

firts, I'm trying to change the background color of a label... and for some reasone it doesn't work.
I tried more then one thing:

d1.BackColor = vbRed
d1.BackColor = RGB(20, 20, 20)
d1.BackColor = "65408"

can anyone thing of a reasone why wont one of those work ?

my second question is how to duplicate a label ? (by code)

thanks in advance, Idan
Aug 30 '07 #1
5 1643
JKing
1,206 Recognized Expert Top Contributor
Hi!

Have a look at your label's property sheet. There should be a property by the name of BackStyle if this property is set to "Transparent" you will need to change it to normal to be able to see the effects of BackColor.
Aug 30 '07 #2
zivon
59 New Member
Thanks.. I feel so stupid :)
Aug 30 '07 #3
missinglinq
3,532 Recognized Expert Specialist
And Transparent is the default setting for labels. I don't really think there's a way to duplicate a control programatically. Exactly what are you trying to accomplish?

Welcome to TheScripts!

Linq ;0)>
Aug 30 '07 #4
JKing
1,206 Recognized Expert Top Contributor
Don't feel stupid. Sometimes the small mistakes are the hardest to solve. Though I do have a suggestion for you in the future. If a method or property isn't drawing an error but still isn't functioning as you think it should take a look at the help file. There maybe something quirky that needs to be done before the property or method will function as it should. The help files usually explain these small details in the remarks section. After all it's almost impossible to remember every possible combination of settings and properties for every control.
Aug 30 '07 #5
zivon
59 New Member
I'll try to explain what I'm trying to do:
its for a B&B place...
basicly, I'm doing a table, on the top there are the dates
and on the right there are the rooms names.
where the room is taken I put the name of the person whos ordered it.

I want to make it dynamic, so I can add rooms. thats why I want to duplicate the labels.. to make it for one room and the duplicats for the other rooms.

I beileve its possible... I think I saw something like this once.. but I can't find it :\
Aug 30 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hank | last post by:
Hi, does anyone know how to change the foreground color of the command prompt through python? For example if i was printing out an error message, I would like it to be red where the normal...
2
by: Chester Ragel | last post by:
Hi, How can I change the font color of a dissabled label control? Chester.
5
by: Martha | last post by:
When I move my mouse over a hyperlink component, the hyperlink does not change color. How do I change the color of a hyperlink when the mouse goes over the hyperlink? or Change the color of a...
5
by: me | last post by:
Hello, I have a question about how too change the background of a command button once it has been click from aliceblue to azure. TIA, Aaron
3
by: Mariame | last post by:
Hello All i have a label that i change his color Programmatically so i use the following statment : Label88.ForeColor = System.Drawing.Color.Red but the problem that the color isnt known its...
5
by: Bob Achgill | last post by:
Label example: "See the dog run." I would like to be able to highlight a given word in the example label using another color than the rest of the words in the sentence and/or maybe underline...
1
by: Anup | last post by:
Hi group, I m using protected System.Web.UI.WebControls.DataGrid (ASP.NET 1.x) I have set the "pager style mode" to "NumericPages" with "AllowingPaging=true"
1
by: Kristopher Wragg | last post by:
I'm just wondering if there is any easy solution to change the pop-up display that is shown when a color property is displayed in the properties grid? We've got a property grid in our...
1
by: parimalao | last post by:
hi all, i want to set asp:label with background half with one color and aonther half with another color. plz help me. thanku.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.