Private Sub Form2_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics = e.Graphics
Dim blackBrush As Brush = Brushes.Black
Dim fillBrush As Brush = Brushes.Gray
Dim whitePen As Pen = Pens.White
Dim format As StringFormat = New StringFormat()
format.Alignment = StringAlignment.Center
format.LineAlignment = StringAlignment.Center
Dim pen As Pen = New Pen(Color.Blue, 4)
'**********************//////// KASA /////////*************************
fillBrush = Brushes.Tomato
pen = New Pen(Color.Black, 3)
'SOL KARE
g.FillPolygon(fillBrush, New PointF() {New PointF(120, 240), New PointF(350, 40), New PointF(350, 340), New PointF(120, 540)})
g.DrawPolygon(pen, New PointF() {New PointF(120, 240), New PointF(350, 40), New PointF(350, 340), New PointF(120, 540)})
'ARKA KARE
g.FillPolygon(fillBrush, New PointF() {New PointF(350, 40), New PointF(650, 40), New PointF(650, 340), New PointF(350, 340)})
g.DrawPolygon(pen, New PointF() {New PointF(350, 40), New PointF(650, 40), New PointF(650, 340), New PointF(350, 340)})
'ALT KARE
g.FillPolygon(fillBrush, New PointF() {New PointF(350, 340), New PointF(647, 340), New PointF(420, 540), New PointF(120, 540)})
g.DrawPolygon(pen, New PointF() {New PointF(350, 340), New PointF(650, 340), New PointF(420, 540), New PointF(120, 540)})
End Sub
'I WANT TO CALL THIS SUB ,PLEASE HELP ME
Dim g As Graphics = e.Graphics
Dim blackBrush As Brush = Brushes.Black
Dim fillBrush As Brush = Brushes.Gray
Dim whitePen As Pen = Pens.White
Dim format As StringFormat = New StringFormat()
format.Alignment = StringAlignment.Center
format.LineAlignment = StringAlignment.Center
Dim pen As Pen = New Pen(Color.Blue, 4)
'**********************//////// KASA /////////*************************
fillBrush = Brushes.Tomato
pen = New Pen(Color.Black, 3)
'SOL KARE
g.FillPolygon(fillBrush, New PointF() {New PointF(120, 240), New PointF(350, 40), New PointF(350, 340), New PointF(120, 540)})
g.DrawPolygon(pen, New PointF() {New PointF(120, 240), New PointF(350, 40), New PointF(350, 340), New PointF(120, 540)})
'ARKA KARE
g.FillPolygon(fillBrush, New PointF() {New PointF(350, 40), New PointF(650, 40), New PointF(650, 340), New PointF(350, 340)})
g.DrawPolygon(pen, New PointF() {New PointF(350, 40), New PointF(650, 40), New PointF(650, 340), New PointF(350, 340)})
'ALT KARE
g.FillPolygon(fillBrush, New PointF() {New PointF(350, 340), New PointF(647, 340), New PointF(420, 540), New PointF(120, 540)})
g.DrawPolygon(pen, New PointF() {New PointF(350, 340), New PointF(650, 340), New PointF(420, 540), New PointF(120, 540)})
End Sub
'I WANT TO CALL THIS SUB ,PLEASE HELP ME