Hi Tamir,
For example, you can first get the rectangle of the tabpage, then draw the
frame to it.
private void tabControl1_Dra wItem(object sender,
System.Windows. Forms.DrawItemE ventArgs e)
{
Graphics g = e.Graphics;
Pen p = new Pen(Color.Blue, 4);
g.DrawRectangle (p,this.tabPage 1.Bounds);
}
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Tamir Khason" <ta**********@t con-NOSPAM.co.il>
| References: <OU************ **@TK2MSFTNGP12 .phx.gbl>
<Jb************ **@cpmsftngxa06 .phx.gbl>
<#j************ **@TK2MSFTNGP12 .phx.gbl>
<Ba************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Set color of TabControl Border
| Date: Mon, 17 Nov 2003 13:12:01 +0200
| Lines: 124
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uv************ **@TK2MSFTNGP09 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: 198.211.173.74
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1998 14
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| That's fine. I already saw it. However I need a way to change border color
| of TabPage inside TabControl without using Windows XP additions (to make
it
| cross-windows) control...
|
| Thankx
|
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
| news:Ba******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Tamir,
| >
| > I think MSDN provides you a quick start of the usage and reference of
| these
| > methods.
| > For example, you can find the tabcontrol's Drawitem event usage in:
| >
|
http://msdn.microsoft.com/library/de...us/cpref/html/
| > frlrfsystemwind owsformstabcont rolclassdrawite mtopic.asp
| >
| > You also can learn how to hook the message of tabcontrol in:
| >
|
http://msdn.microsoft.com/library/de...us/cpref/html/
| > frlrfsystemwind owsformscontrol classwndproctop ic.asp
| >
| > There are also many samples in internet, you can search these keyword in
| >
www.google.com.
| >
| > Hope this helps,
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! -
www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Tamir Khason" <ta**********@t con-NOSPAM.co.il>
| > | References: <OU************ **@TK2MSFTNGP12 .phx.gbl>
| > <Jb************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Set color of TabControl Border
| > | Date: Sun, 16 Nov 2003 17:05:22 +0200
| > | Lines: 57
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#j************ **@TK2MSFTNGP12 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: 213.8.78.114
| > | Path:
| >
|
cpmsftngxa06.ph x.gbl!TK2MSFTNG XA06.phx.gbl!TK 2MSFTNGXA05.phx .gbl!TK2MSFTNGP 0
| > 8.phx.gbl!TK2MS FTNGP12.phx.gbl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1996 78
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Have you good references for those methods/??
| > |
| > |
| > | ""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
| > | news:Jb******** ******@cpmsftng xa06.phx.gbl...
| > | >
| > | > Hi Tamir,
| > | >
| > | > Thanks for posting in this group.
| > | > What does your "access those properties,not supported by standart
| > | > interface" mean?
| > | > The TabControl in .Net exposes the owner-draw interface for you. You
| can
| > | > handle DrawItem event of TabControl.
| > | > Also, you can override certain protected methods of this control.
| > | > You can override the WndProc method of TabControl or TabPage, then
you
| > can
| > | > hook some messages of this control.
| > | >
| > | > Hope this helps,
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! -
www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Tamir Khason" <ta**********@t con-NOSPAM.co.il>
| > | > | Subject: Set color of TabControl Border
| > | > | Date: Thu, 13 Nov 2003 20:59:38 +0200
| > | > | Lines: 9
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <OU************ **@TK2MSFTNGP12 .phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | NNTP-Posting-Host: 198.211.173.74
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl
| > | microsoft.publi c.dotnet.langua ges.csharp:1991 01
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > |
| > | > | How be able to manage more deeply UI of TabControl and TabPage
| > | > | For example - I want to manage border color, change color of
| TabPage
| > | > reef,
| > | > | eliminate spaces from both sides of the reef, so I bould custom
| > control
| > | > that
| > | > | inherit all information from TabPage, but how to access those
| > | properties,
| > | > | not supported by standart interface???
| > | > |
| > | > | Thank you
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|