Private Sub MaSub Dim bmpSS As Bitmap Dim gfxSS As Graphics 'mZone, rectangle à capturer bmpSS = New Bitmap(mZone.Width, mZone.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb) gfxSS = Graphics.FromImage(bmpSS) gfxSS.CopyFromScreen(mZone.Location, New Point(0, 0), mZone.Size, CopyPixelOperation.SourceCopy) 'mFileName, pour le nom du fichier de destination 'System.Drawing.Imaging.ImageFormat.Png Pour du PNG bmpSS.Save(mFileName, System.Drawing.Imaging.ImageFormat.Png) gfxSS.Dispose() bmpSS.Dispose() End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question