1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Public Class Cadre
Private BoderColor As Color = Color.Black
Private ButtonLocation As Point = New Point(1, 1)
Private ButtonWidth As Integer = 50
Private buttonHeight As Integer = 70
Public Sub New()
' Cet appel est requis par le Concepteur Windows Form.
MyBase.New()
InitializeComponent()
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
End Sub
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
Dim rect As New Rectangle(ButtonLocation.X, ButtonLocation.Y, ButtonWidth, buttonHeight)
e.Graphics.DrawRectangle(New Pen(BoderColor, 3), rect)
End Sub
End Class |
Partager