Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPublic Class Form1 Private bmpImage As Bitmap Private WithEvents pctImage As PictureBox Private WithEvents btnEcrire As Button Private WithEvents btnSauver As Button Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load bmpImage = New Bitmap("monImage.jpg") pctImage = New PictureBox With pctImage .Location = New Point(10, 40) .Size = bmpImage.Size End With Me.Controls.Add(pctImage) btnEcrire New Button With {.Location New Point(10, 10), .Text = "Ecrire"} Me.Controls.Add(btnEcrire) btnSauver New Button With {.Location New Point(100, 10), .Text = "Sauver"} Me.Controls.Add(btnSauver) End Sub Private Sub pctImage_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles pctImage.Paint e.Graphics.DrawImage(bmpImage, 0, 0) End Sub Private Sub btnEcrire_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEcrire.Click Dim grf As Graphics = Graphics.FromImage(bmpImage) grf.DrawString("Hello", New Font("Times New Roman", 12), Brushes.Red, 0, 0) grf.Dispose() pctImage.Refresh() End Sub Private Sub btnSauver_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSauver.Click bmpImage.Save(My.Computer.FileSystem.SpecialDirectories.Desktop + "\ImageModifiee.jpg", Imaging.ImageFormat.Jpeg) End Sub End Class