Soyez le premier à donner votre avis sur cette source.
Vue 25 478 fois - Téléchargée 2 262 fois
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
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.