Click here to Skip to main content
15,920,383 members
Home / Discussions / C#
   

C#

 
GeneralRe: socket again Pin
mohammad92916-Aug-05 20:12
mohammad92916-Aug-05 20:12 
GeneralParsing Time and Date Pin
Anonymous16-Aug-05 3:01
Anonymous16-Aug-05 3:01 
GeneralTrustFailure exception Pin
zakharov_v16-Aug-05 2:55
zakharov_v16-Aug-05 2:55 
GeneralRe: TrustFailure exception Pin
zakharov_v16-Aug-05 20:06
zakharov_v16-Aug-05 20:06 
GeneralActive Tab, change Colour Pin
zaboboa16-Aug-05 2:47
zaboboa16-Aug-05 2:47 
GeneralRe: Active Tab, change Colour Pin
Alomgir Miah16-Aug-05 6:14
Alomgir Miah16-Aug-05 6:14 
GeneralRe: Active Tab, change Colour Pin
zaboboa16-Aug-05 8:00
zaboboa16-Aug-05 8:00 
GeneralRe: Active Tab, change Colour Pin
Mohamad Al Husseiny16-Aug-05 8:55
Mohamad Al Husseiny16-Aug-05 8:55 
Yes tabcontrol has DrawItem event which will You can subscribe to it and do custom drawing
You have to set DrawMode Propert to OwnerDrawFixed
Then Draw your tabPage you can use the following code as start
private void tabControl1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
{
      if(this.tabControl1.SelectedIndex==e.Index)
       {
	      SolidBrush b=new SolidBrush(Color.Blue);
	      e.Graphics.DrawString(tabControl1.TabPages  [e.Index].Text, e.Font, b,e.Bounds,sf);
	      e.DrawFocusRectangle();
	      b.Dispose();
	}
	else
	{
	  SolidBrush b=new SolidBrush(e.ForeColor);
	  e.Graphics.DrawString(tabControl1.TabPages[e.Index].Text, e.Font, b,e.Bounds,StringFormat.GenericDefault);
	   b.Dispose();
	}
			
}

Notes:
1-This quick code check it before you use it.
2-Create your StringFormat object and pass it to draw string to set alignment as the above code dont make any alignment


MCAD
GeneralExe file icon Pin
Ming Luo16-Aug-05 2:10
Ming Luo16-Aug-05 2:10 
GeneralRe: Exe file icon Pin
mohammad92916-Aug-05 2:17
mohammad92916-Aug-05 2:17 
GeneralRe: Exe file icon Pin
S. Senthil Kumar16-Aug-05 3:01
S. Senthil Kumar16-Aug-05 3:01 
GeneralRe: Exe file icon Pin
Ami Bar16-Aug-05 18:35
Ami Bar16-Aug-05 18:35 
GeneralAdding ToolTip to ListView Subitem Pin
Member 145978316-Aug-05 0:11
Member 145978316-Aug-05 0:11 
GeneralRe: Adding ToolTip to ListView Subitem Pin
mav.northwind16-Aug-05 0:36
mav.northwind16-Aug-05 0:36 
GeneralRe: Adding ToolTip to ListView Subitem Pin
Alomgir Miah16-Aug-05 3:47
Alomgir Miah16-Aug-05 3:47 
GeneralRe: Adding ToolTip to ListView Subitem Pin
Member 145978319-Aug-05 23:43
Member 145978319-Aug-05 23:43 
GeneralC# How to run Remote process Pin
mohammad92915-Aug-05 23:50
mohammad92915-Aug-05 23:50 
GeneralRe: C# How to run Remote process Pin
snouto16-Aug-05 8:38
snouto16-Aug-05 8:38 
GeneralRe: C# How to run Remote process Pin
mohammad92916-Aug-05 20:20
mohammad92916-Aug-05 20:20 
GeneralWhats the equivalent of this in C# Pin
Mridang Agarwalla15-Aug-05 23:20
Mridang Agarwalla15-Aug-05 23:20 
GeneralRe: Whats the equivalent of this in C# Pin
J4amieC16-Aug-05 0:06
J4amieC16-Aug-05 0:06 
GeneralRe: Whats the equivalent of this in C# Pin
Dave Doknjas16-Aug-05 13:58
Dave Doknjas16-Aug-05 13:58 
GeneralOutlook Addin Pin
Paul Roullier15-Aug-05 23:14
Paul Roullier15-Aug-05 23:14 
GeneralCode Protection in C# Pin
Anonymous15-Aug-05 22:07
Anonymous15-Aug-05 22:07 
GeneralRe: Code Protection in C# Pin
Guffa16-Aug-05 7:19
Guffa16-Aug-05 7:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.