473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot change background on Tab control

How do you change the overall background color for a tab
control (not on each individual tab).

I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.
Thanks
mikl
Nov 20 '05 #1
10 12028
* "mikl" <an*******@discussions.microsoft.com> scripsit:
How do you change the overall background color for a tab
control (not on each individual tab).

I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.


<http://www.onteorasoftware.com/VisualBasic.aspx#AnsTQ1>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #2
You have to override the BackColor property of the control.
Add the following class to your project

*********************

Public Class ColorTabCtrl
Inherits System.Windows.Forms.TabControl
'ColorTabCtrl
Private ColorVarBackColor As Color =
System.Drawing.SystemColors.ActiveBorder
Overrides Property BackColor() As Color
'Sets the method for retrieving the value of your property.
Get
Return ColorVarBackColor
End Get
'Sets the method for setting the value of your property.
Set(ByVal Value As Color)
ColorVarBackColor = Value
End Set
End Property
End Class

***********

To use ColorTabCtrl, go to Form1 declaration section for TabControl. By
default it should have

Friend WithEvents TabControl1 As System.Windows.Forms.TabControl

replace above code with following line

Friend WithEvents TabControl1 As ColorTabCtrl

*************

By default, Sub InitializeComponent() have follwoing code

Me.TabControl1 = New System.Windows.Forms.TabControl()

replace above code with following line

Me.TabControl1 = New ColorTabCtrl()

*************

Set BackColor for TabControl

Me.TabControl1.BackColor = System.Drawing.Color.Blue

*****************************

Good Luck!

Shawn Shelton
mikl wrote:
How do you change the overall background color for a tab
control (not on each individual tab).

I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.
Thanks
mikl


Nov 20 '05 #3
Neither of these worked well at all. I want to change the
entire background color, not just the tabs (SEE BELOW)

These still do not address the issue.

Any other Suggestions?

thanks,

mikl
-----Original Message-----
How do you change the overall background color for a tab
control (not on each individual tab).

I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.
Thanks
mikl
.

Nov 20 '05 #4
* "mikl" <an*******@discussions.microsoft.com> scripsit:
Neither of these worked well at all. I want to change the
entire background color, not just the tabs (SEE BELOW)

These still do not address the issue.


<http://www.onteorasoftware.com/VisualBasic.aspx#AnsTQ1>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #5
Cor
Hi Herfried,

Are you building long threads again?

The OP said to you, that this answer did not fit his problem and you send it
again.

<http://www.onteorasoftware.com/VisualBasic.aspx#AnsTQ1>


It is not the Quantity but the Quality that counts I think.

A lot of your posts have high Quality, so don't let it be disturb by the
Quantity.

Cor
Nov 20 '05 #6
I couldnt find a way so I designed my own with pannels and labels

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

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

"mikl" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
How do you change the overall background color for a tab
control (not on each individual tab).

I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.
Thanks
mikl

Nov 20 '05 #7
* "Cor" <no*@non.com> scripsit:
Are you building long threads again?

The OP said to you, that this answer did not fit his problem and you send it
again.


Seemed to be a bug in the Netscape newsreader on university. I didn't
see my other post...

:-(

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #8
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote...
* "Cor" <no*@non.com> scripsit:
Are you building long threads again?

The OP said to you, that this answer did not fit his problem and you send it again.
Seemed to be a bug in the Netscape newsreader on university. I didn't
see my other post...


Actually if we play the Herfried game it seems to be you just don't
understand that you wrote the same response four days earlier...

It isn't the newsreader in this case... but the news poster. Perhaps if you
didn't post as many responses you could keep better track. Just a
suggestion... but then blaming the tool sometimes works too.

* "mikl" <an*******@discussions.microsoft.com> scripsit: How do you change the overall background color for a tab
control (not on each individual tab).

I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.


<http://www.onteorasoftware.com/VisualBasic.aspx#AnsTQ1>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #9
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
[...]

Rules of Conduct
<http://www.microsoft.com/communities/conduct/default.mspx>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #10
We've all seen this response herfried... we all saw the series where you
added the quote... we saw the series when you excuse yourself because
English is not your native language.

Please read the rules of conduct and follow their "intent" rather than their
"letter." You smile when you call people names but your attitude is as bad
(not in your mind of course.)

You just posted a message accusing some posters of saying that posting links
was "bad" or a waste of time. Nobody ever suggested that but because you
smile we're all supposed to cut you some slack.

Rules of Conduct
<http://www.microsoft.com/communities/conduct/default.mspx>

Read them carefully please.

Did you happen to notice that no other MVP and nobody from Microsoft on this
newsgroup has gotten the kinds of responses you do? Why do think that is?


"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bo*************@ID-208219.news.uni-berlin.de...
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
[...]

Rules of Conduct
<http://www.microsoft.com/communities/conduct/default.mspx>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>

Nov 20 '05 #11

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

Similar topics

5
4907
by: rathnesh | last post by:
when using a web application which includes taking an asp page then going to another asp page and coming back to first page ...some times connection to iis gets terminated and page canot be...
6
5217
by: Louise | last post by:
Hi I have written an HTML pages which does not have any colour specifying tags as far I know. When I view this in an Microsoft internet explorer browser it appears with a white background and...
5
26989
by: AFN | last post by:
I'm trying to set a submit button to change text and color when clicked. Like saying "please wait" instead of "submit" and then changing the background color and text color. All works, except for...
1
4916
by: Karen Grube | last post by:
Hi! I'm using a standard server side ASP.Net listbox control on a web form. The page is basically various shades of green. The listbox itself has a pale green background and forest green text...
1
3459
by: HS1 | last post by:
Hello I can change the background of each page of a TabControl but cannot change the background (BackColor) of this tabcontrol. I did not see it in the properties page. If you know how to...
6
3349
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
4
2653
by: martin1 | last post by:
Hi, want to loop DataSet to change row background color based on data retrieved from sql db, the color can be blue, yellow, red or purple. Therefore, Is there any way (vb.net) to change dataset...
3
17308
by: Bundy | last post by:
Hi How do I change the background colour of an input box in a form as soon as the value is changed? Also the background should revert back to it's original colour if the user decides that they...
5
7138
by: moondaddy | last post by:
I have a custom control where users can set the backcolor of one of it's UI elements via a DP I created. One of the colors they can pick is a brush called CustomGradient where I would set the DP...
0
7199
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,...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
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...
1
5000
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
4667
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
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.