473,387 Members | 3,787 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,387 software developers and data experts.

change color of a control's border

I have to change the color of the border in a Control whose BorderStyle is
"Fixed3D" (for example Label).
I could change the color of a Label only if its BorderStyle was set to
"None" but I havent't found a way so far that allows me to set the color for
a control with BorderStyle "Fixed3D".

Actually I need this functionality to change the Border-Color for the tabs
in an TabControl.

does anybody has an idea how I could do this? I also appreciate some
sample-code.

Jul 21 '05 #1
4 1986
Hi Paiam,

A solution from

microsoft.dotnet.languages.vb newsgroup

http://groups.google.com/groups?selm...tngp13.phx.gbl

I hope this helps?

Cor
Jul 21 '05 #2
I tried this, but it doesn't take effect on the color of the border ob the
tabs. With this implementation you just can change the color of the tab not
its border-color.

"Cor Ligthert" <no**********@planet.nl> schrieb im Newsbeitrag
news:OT**************@tk2msftngp13.phx.gbl...
Hi Paiam,

A solution from

microsoft.dotnet.languages.vb newsgroup

http://groups.google.com/groups?selm...tngp13.phx.gbl
I hope this helps?

Cor

Jul 21 '05 #3
Hi Paiam,

It is based on a rectangle would it not be making a smaller rectangle after
that and paint that again in the old color, that was the way I would try it
when it was my problem.

Cor
Jul 21 '05 #4
As I said last time that you asked this question, you will have to take full
control of the drawing and draw the borders yourself. This is fairly simple
for buttonstyle borders but tabstyle borders will need more work. For button
style borders you just use the 'ControlPaint.DrawBorder' method to draw the
border in your desired colour.

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...bcontrols.html


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Jul 21 '05 #5

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

Similar topics

1
by: Cezary | last post by:
Hello. I have this code below and want to change background, but this works only in IE5.x. Why ? <div onmouseover="this.className='change'" onmouseout="this.className=''"...
1
by: Paiam Salavati | last post by:
I have to change the color of the border in a Control whose BorderStyle is "Fixed3D" (for example Label). I could change the color of a Label only if its BorderStyle was set to "None" but I...
1
by: Leo | last post by:
I created a user control which is some text contained in a HtmlTable. I put this control into main form. I would like to have the ability to move this control around in the main form. I think one...
10
by: tshad | last post by:
I have a problem setting the background color of textbox on the fly. I tried using: applicantID.backcolor = "F6F6F6" and applicantID.backcolor = "#F6F6F6"
4
by: Dick | last post by:
The GridLines property is set to Both and, in any case, I can see them if I make the background anything other than white. But I really want the backgroud white! Will I have to be content with not...
1
by: Patrick | last post by:
Hello, I want to change the border of an asp-dropdownlist via C#. With ddl.CssClass = "empty"; I want to change the border of the DDL to red, but it works only in Firefox not in Internet...
0
by: aarongoodman | last post by:
Does anyone know how to change the color and width of a control's border when specifying BorderStyle.FixedSingle etc... Is there an EASY way to change the Brush color or alter the Pen width from...
3
by: =?Utf-8?B?Q2xhZXNXZWRpbg==?= | last post by:
I want my application to have a special color on the Window forms borders. Not the standard one (which the user has set up in his desktop-properties)... How can I do this? I can change...
2
by: Randy | last post by:
I'm trying to loop through all of the textboxes on my form and change some of their properties. I'm stuck on changing the border style to none. Here is my code: Dim c As Control For Each c In...
6
by: AAaron123 | last post by:
I'm using the CreateUserWizard Web Server Control The error message when the passwords do not match is colored red. Red does not show well against my background so I like to change that color. I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.