Enregistrer une picturebox
Résolu
Alvin1614
Messages postés
107
Date d'inscription
Statut
Membre
Dernière intervention
-
Utilisateur anonyme -
Utilisateur anonyme -
A voir également:
- Enregistrer une picturebox
- Audacity enregistrer son pc - Guide
- Enregistrer une conversation - Guide
- Comment enregistrer une video youtube - Guide
- Comment enregistrer une musique sur youtube en mp3 - Guide
- Enregistrer une musique pour sonnerie - Guide
2 réponses
bonjour,
Pour une capture d'écran voir ceci:
https://codes-sources.commentcamarche.net/source/101092-screenshot-avec-rectangle-de-selection
pour ton code:
Voilà
Pour une capture d'écran voir ceci:
https://codes-sources.commentcamarche.net/source/101092-screenshot-avec-rectangle-de-selection
pour ton code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Me.WindowState = System.Windows.Forms.FormWindowState.Minimized Dim bounds As Rectangle = Screen.PrimaryScreen.Bounds Dim bmp As New Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb) 'nouveau bitmap au dimansion de l'écran Dim g As Graphics = Graphics.FromImage(bmp) g.CopyFromScreen(bounds.Left, bounds.Top, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy) PictureBox1.Image = bmp SaveFileDialog1.Filter = "Jpeg (*.jpeg*)|*.jpeg" If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then PictureBox1.Image.Save(SaveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg) End If End Sub
Voilà