public class MyButton : Button { protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); int borderWidth = 1; Color borderColor = Color.Blue; ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle, borderColor, borderWidth, ButtonBorderStyle.Solid, borderColor, borderWidth, ButtonBorderStyle.Solid,...
How to change the color of Tab Control in c#
Steps :-1. Set the TabControl's DrawMode to OwnerDraw.2. Handle the DrawItem event.private void ChangeColorOFTabControl(object sender, DrawItemEventArgs e){Font TabFont;Brush BackBrush = new SolidBrush(Color.Green); //Set background colorBrush ForeBrush = new SolidBrush(Color.Yellow);//Set foreground colorif (e.Index == this.tabControl1.SelectedIndex){TabFont...