How to change the checked color of a checkbox

  • Thread starter Thread starter Michael O'Connor
  • Start date Start date
M

Michael O'Connor

How can I change the checked color of a checkbox - that is, the color of the
square, not the background color of the control? Any help would be
appreciated.
 
Michael,

That becomes drawing,

You have to find the rectangle from that and than it is mostly simple her a
sample for all textbox borders I once copied.

\\\Taken from newsgroup sand in by Jacob Grass
Private Sub form1_Paint(ByVal sender As Object, _
ByVal e As PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics = e.Graphics
Dim pen As New Pen(Color.Red, 2.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()
End Sub
////

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top