1)Mettez 2 boutons
2)Mettez 1 PictureBox
3)Mettez 1 Timer
Code:
Bouton pour prendre le screen:
Bouton pour sauvegarder:
timer:
Et voila fini ;)
2)Mettez 1 PictureBox
3)Mettez 1 Timer
Code:
Bouton pour prendre le screen:
Code:
Me.Opacity = 0
Timer1.Enabled = True
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshot
Bouton pour sauvegarder:
Code:
'Save Code
Dim savefiledialog1 As New SaveFileDialog
Try
savefiledialog1.Title = "Save File"
savefiledialog1.FileName = "*.bmp"
savefiledialog1.FileName = "Bitmap |*.bmp"
If savefiledialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
End If
Catch ex As Exception
'Do Nothing
End Try
timer:
Code:
Me.Opacity = 100
Timer1.Enabled = False
Et voila fini ;)