Make a screen Capture Program

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.
8 posts Page 1 of 1
Contributors
User avatar
shabs
Just Registered
Just Registered
Posts: 3
Joined: Mon Jun 07, 2010 6:35 am

Make a screen Capture Program
shabs
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
Code: Select all
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
Add the following code to Capture Button
Code: Select all
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
It works..

You can also change the image format or give option as shown in my Previous Tutorial

Regards
Shahbaz Singh
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

This has been done so many times, and here's a faster way to capture your screen. Press the "Print Screen" button (PrtSc right by the backspace)
GoodGuy17
Coding God
Coding God
Posts: 1610
Joined: Mon Sep 07, 2009 12:25 am

Re: Make a screen Capture Program
GoodGuy17
I have already made a tutorial on this, but thanks for trying to contribute to the site at least! cooll;
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: Make a screen Capture Program
Lewis
mikethedj4 wrote:
This has been done so many times, and here's a faster way to capture your screen. Press the "Print Screen" button (PrtSc right by the backspace)
Nice and true, and easy :)
Image
GoodGuy17
Coding God
Coding God
Posts: 1610
Joined: Mon Sep 07, 2009 12:25 am

Re: Make a screen Capture Program
GoodGuy17
mikethedj4 wrote:
This has been done so many times, and here's a faster way to capture your screen. Press the "Print Screen" button (PrtSc right by the backspace)
Yeah, but with that you have to PrtSc, then paint, then paste in paint, then save. With this, it is push button, push save. IMO PrtSc is not faster...
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Hello shabs,

Good work and if you combine it with the image convertor code you posted you will have yourself a great little screen capture tool.

Its true that we have had similar codes posted before but its always good to see new members posting their codes ;). Keep it up cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
bayley60
Just Registered
Just Registered
Posts: 3
Joined: Tue May 18, 2010 9:39 am

Re: Make a screen Capture Program
bayley60
thanks i made one and it works great but only if i could put a hot key for it like when its minimized i could press f9 and it would capture the screen.
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Make a screen Capture Program
mandai
This thread has info on adding support for hotkeys: viewtopic.php?f=53&t=1138
8 posts Page 1 of 1
Return to “Tutorials”