Make a screen Capture Program
Posted: Mon Jun 07, 2010 1:34 pm
Hi Again,
See here a program to capture your screen
You Need...
2 Buttons ( Button 1 "Capture" Button 2 "Save")
1 Picture Box (make its size as bigger as possible)(forpreview)
1 Save File Dialog
Add the following code to Capture Button
You can also change the image format or give option as shown in my Previous Tutorial
Regards
Shahbaz Singh
See here a program to capture your screen
You Need...
2 Buttons ( Button 1 "Capture" Button 2 "Save")
1 Picture Box (make its size as bigger as possible)(forpreview)
1 Save File Dialog
Add the following code to Capture Button
Code: Select all
Add the following code to Capture Button
Dim bounds As Rectangle
Dim screenshots As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshots = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshots)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshots
Code: Select all
It works..Dim SaveFileDialog1 As New SaveFileDialog
Try
SaveFileDialog1.Title = "Save Image"
SaveFileDialog1.FileName = "*.jpg"
SaveFileDialog1.Filter = "JPEGp| *.jpg"
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBox1.Image.Save(SaveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg)
End If
Catch ex As Exception
End Try
You can also change the image format or give option as shown in my Previous Tutorial
Regards
Shahbaz Singh