G
Guest
Hello
I am having an issue with changing the bordercolor of the panel control
I have got to a point where I have created my own control and inherited the Panel control, then in the Overrides Sub OnPaint I draw a rectangle. My code below
The problem I am having is when the new control is resized the border lines are being redrawn over an over again. I guess that makes sense. But how do I clear what was drawn there before
Or I guess the better question would be does anyone else have a better idea on how to change the bordercolor of the panel control
Thanks Jef
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs
MyBase.OnPaint(e
Dim _PenBorder As New Pen(Color.Black, 1
_PenBorder.Color = BorderColo
e.Graphics.DrawRectangle(_PenBorder, 0, 0, MyBase.Width - 1, MyBase.Height - 1
_PenBorder.Dispose(
End Sub
I am having an issue with changing the bordercolor of the panel control
I have got to a point where I have created my own control and inherited the Panel control, then in the Overrides Sub OnPaint I draw a rectangle. My code below
The problem I am having is when the new control is resized the border lines are being redrawn over an over again. I guess that makes sense. But how do I clear what was drawn there before
Or I guess the better question would be does anyone else have a better idea on how to change the bordercolor of the panel control
Thanks Jef
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs
MyBase.OnPaint(e
Dim _PenBorder As New Pen(Color.Black, 1
_PenBorder.Color = BorderColo
e.Graphics.DrawRectangle(_PenBorder, 0, 0, MyBase.Width - 1, MyBase.Height - 1
_PenBorder.Dispose(
End Sub