- Private Sub BtnRectangle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnRectangle.Click
- Dim objBitMap As New Bitmap(PictureBox1.Width, PictureBox1.Height)
- Dim objGraphics As Graphics
- Dim MonRectable As Rectangle
- Dim MaBrush As Brush
-
- objGraphics = Graphics.FromImage(objBitMap)
- MonRectable = New Rectangle(10, 10, 100, 100)
- MaBrush = New SolidBrush(Color.Blue)
- objGraphics.Clear(Color.White)
- objGraphics.FillRectangle(MaBrush, MonRectable)
- Me.PictureBox1.Image = objBitMap
- objGraphics.Dispose()
- objGraphics = Nothing
- End Sub
-
- Private Sub BtnCercle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCercle.Click
- Dim objBitMap As New Bitmap(PictureBox1.Width, PictureBox1.Height)
- Dim objGraphics As Graphics
- Dim MonRectable As Rectangle
- Dim MaBrush As Brush
-
- objGraphics = Graphics.FromImage(objBitMap)
- MonRectable = New Rectangle(10, 10, 100, 100)
- MaBrush = New SolidBrush(Color.Blue)
- objGraphics.Clear(Color.White)
- objGraphics.FillEllipse(MaBrush, MonRectable)
- Me.PictureBox1.Image = objBitMap
- objGraphics.Dispose()
- objGraphics = Nothing
- End Sub
-
Private Sub BtnRectangle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnRectangle.Click
Dim objBitMap As New Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim objGraphics As Graphics
Dim MonRectable As Rectangle
Dim MaBrush As Brush
objGraphics = Graphics.FromImage(objBitMap)
MonRectable = New Rectangle(10, 10, 100, 100)
MaBrush = New SolidBrush(Color.Blue)
objGraphics.Clear(Color.White)
objGraphics.FillRectangle(MaBrush, MonRectable)
Me.PictureBox1.Image = objBitMap
objGraphics.Dispose()
objGraphics = Nothing
End Sub
Private Sub BtnCercle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCercle.Click
Dim objBitMap As New Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim objGraphics As Graphics
Dim MonRectable As Rectangle
Dim MaBrush As Brush
objGraphics = Graphics.FromImage(objBitMap)
MonRectable = New Rectangle(10, 10, 100, 100)
MaBrush = New SolidBrush(Color.Blue)
objGraphics.Clear(Color.White)
objGraphics.FillEllipse(MaBrush, MonRectable)
Me.PictureBox1.Image = objBitMap
objGraphics.Dispose()
objGraphics = Nothing
End Sub