1
Private Sub pancontrols_Paint(sender As Object, e As PaintEventArgs) Handles pancontrols.Paint
e.Graphics.Clear(Color.Yellow)
Dim borderWidth As Integer = 1
Dim theColor As Color = Color.Gray
ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle, theColor, borderWidth, ButtonBorderStyle.Solid, theColor, borderWidth, ButtonBorderStyle.Solid, theColor, borderWidth, ButtonBorderStyle.Solid, theColor, borderWidth, ButtonBorderStyle.Solid)
MyBase.OnPaint(e)
End Sub
代碼是像上面當在包裹的畫線。
當我調整大小,尤其是調整大小以增加寬度時,畫線仍然存在。
即使我用純色清除e.Graphics,問題仍然存在。
有沒有簡單的方法來防止這種情況?
謝謝!