Textbox Border Line Size Change Color Visual Basic (Vb.Net) | Visual Studio Code

1
Textboxes Border Line Size

 (For All Textboxes  )
 
    Private Sub Form1_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

        Dim g As Graphics = e.Graphics
        Dim pen As New Pen(Color.Blue, 4.0)
        For Each ctr As Control In Me.Controls
            If TypeOf ctr Is TextBox Then
                g.DrawRectangle(pen, New  _
                Rectangle(ctr.Location, ctr.Size))
            End If
        Next
        pen.Dispose()
  
    
    (For Custom Text Boxes)
Dim p As New Pen(Color.Red, 2)
        e.Graphics.DrawRectangle(p, New Rectangle(TextBox1.Location + New Size(1, 1), TextBox1.Size - New Size(2, 2)))
        p.Dispose()

        Dim p1 As New Pen(Color.Red, 2)
        e.Graphics.DrawRectangle(p1, New Rectangle(TextBox2.Location + New Size(1, 1), TextBox2.Size - New Size(2, 2)))
        p.Dispose()
          End Sub
          
          (For Button Coding)
          
          Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then
            TextBox1.Region = New Region(New Rectangle(2, 2, TextBox1.Width - 4, TextBox1.Height - 4))
        ElseIf TextBox2.Text = "" Then
            TextBox2.Region = New Region(New Rectangle(2, 2, TextBox2.Width - 4, TextBox2.Height - 4))
        Else
        End If
    End Sub

Post a Comment

  1. Textbox Border Line Size Change Color Visual Basic (Vb.Net) >>>>> Download Now

    >>>>> Download Full

    Textbox Border Line Size Change Color Visual Basic (Vb.Net) >>>>> Download LINK

    >>>>> Download Now

    Textbox Border Line Size Change Color Visual Basic (Vb.Net) >>>>> Download Full

    >>>>> Download LINK y2

    ReplyDelete

 
Top