Border Settings in Windows Forms TextBox (TextBoxExt)

15 Jul 20251 minute to read

The border settings of the TextBoxExt control are discussed in this section.

You can change the color and styles of the border of the TextBoxExt control by using Border3DStyle, BorderColor, BorderSides and BorderStyle properties.

TextBoxExt textBoxExt1 = new TextBoxExt();
textBoxExt1.Location = new System.Drawing.Point(100, 100);
textBoxExt1.Size = new System.Drawing.Size(100, 20);
textBoxExt1.Text = "textboxext1";
textBoxExt1.Border3DStyle = System.Windows.Forms.Border3DStyle.Raised;
textBoxExt1.BorderColor = System.Drawing.Color.Orchid;
textBoxExt1.BorderSides = System.Windows.Forms.Border3DSide.All;
textBoxExt1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(textBoxExt1);
Dim textBoxExt1 As New TextBoxExt()
textBoxExt1.Location = New System.Drawing.Point(100, 100)
textBoxExt1.Size = New System.Drawing.Size(100, 20)
textBoxExt1.Text = "textboxext1"
textBoxExt1.Border3DStyle = System.Windows.Forms.Border3DStyle.Raised
textBoxExt1.BorderColor = System.Drawing.Color.Orchid
textBoxExt1.BorderSides = System.Windows.Forms.Border3DSide.All
textBoxExt1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Controls.Add(textBoxExt1)

Change the border style and color in WF TextBoxExt