VB 2008 Tutorial - Screen Capture
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
3 posts
Page 1 of 1
Add 1 PictureBox, 2 Buttons and 1 OpenFileDialog ;)
Rename a Button1 text into Capture Screen, Rename Button2 text into Save Image
Double click and insert this code into Button1
*******************Thanks for reading my tutorial, I think this Tutorial will be most helpful to you!*******************
If you want any custom tutorial for you or you need any help in VS.NET, VB.NET, Software Coding, Designing and much more any help in Computer stuffs just ask me
Mostly i will help everyone in coding and design stuffs in on Computer
- Best regards hehaho;
- Tvs Praveen wahooo;
- Thanks CodeNStuff! for this amazing Website cooll;
Rename a Button1 text into Capture Screen, Rename Button2 text into Save Image
Double click and insert this code into Button1
Code: Select all
Double click and insert this code into Button2Dim 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
Code: Select all
Dim savefiledialog1 As New SaveFileDialog
Try
savefiledialog1.Title = "Save Captured Image"
savefiledialog1.FileName = "Screenshot Image 1"
savefiledialog1.Filter = "All Type Of Image Files|*.*|Joint Photographic Experts Group [JPEG]|*.jpg|Bitmap [BMP|*.bmp|Tagged Image File Format [TIFF]|*.tiff|Portable Network Graphics [PNG]|*.png"
If savefiledialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
End If
Catch ex As Exception
End Try
*******************Thanks for reading my tutorial, I think this Tutorial will be most helpful to you!*******************
If you want any custom tutorial for you or you need any help in VS.NET, VB.NET, Software Coding, Designing and much more any help in Computer stuffs just ask me
Mostly i will help everyone in coding and design stuffs in on Computer
- Best regards hehaho;
- Tvs Praveen wahooo;
- Thanks CodeNStuff! for this amazing Website cooll;
Last edited by tvs praveen on Wed Jan 06, 2010 6:30 am, edited 4 times in total.
Nice tutorial, but I would like to be able to save it as video.
------------------Thanks for Watching Video!, I think this Tutorial i`ll be most helpful to you!, Best regards, Tvs Praveen----------------------------There is no video...
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023