Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

VB 9.0 How to make a Screenshot Tool


  • Please log in to reply
23 replies to this topic

#1 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 30 December 2008 - 03:45 PM

Hello CodeCall

Today i'll show you how to make a ScreenShot Program in Visual Basic
2008 Express Edition ..

That will look like This
Posted Image

All You'll need are :
2 Buttons
1 Picture Box.

Button 1 rename with Take a ScreenShoot ..and
Button 2 rename with Save ..
and the Picture Box Size with a big Area ..

The Code for Button 1(Take a ScreenShot ) is
        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

and for the button 2 ( SAVE ) is

        Dim savefiledialog1 As New SaveFileDialog
        Try
            savefiledialog1.Title = "Save File"
            savefiledialog1.FileName = "*.bmp"
            savefiledialog1.Filter = "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

a Screenshot that i made with it ..
Posted Image

Finally , Test it ..

[ATTACH]1193[/ATTACH]

Best Wishes ,
Mendim.

Attached Files


  • 5

#2 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 31 December 2008 - 07:42 AM

Very neat tutorial! +rep
  • 0

#3 amrosama

amrosama

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 2765 posts

Posted 31 December 2008 - 07:47 AM

good tutorial mendim, you are doing a nice job with these new tutorials
remind me to +rep you later because i cant now
  • 0
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#4 SaintLion

SaintLion

    CC Resident

  • Just Joined
  • PipPipPipPip
  • 58 posts

Posted 31 December 2008 - 09:23 AM

Nice man, I like it +rep
  • 0

#5 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 31 December 2008 - 12:33 PM

Very neat tutorial! +rep


good tutorial mendim, you are doing a nice job with these new tutorials
remind me to +rep you later because i cant now


Nice man, I like it +rep



Thanks a lot .. :D
  • 0

#6 Egz0N

Egz0N

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1155 posts

Posted 31 December 2008 - 02:12 PM

nice one mendim. .. don't forget to remind me to +rep you when it lets me to :)
  • 0

#7 whitey6993

whitey6993

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 156 posts

Posted 01 January 2009 - 07:14 AM

Awesome tutorial. +rep
  • 0

#8 Egz0N

Egz0N

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1155 posts

Posted 10 January 2009 - 05:40 PM

now i can +rep you .. i think this +rep gonna make you GuRu .. Congrats .. :)
  • 0

#9 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 11 January 2009 - 02:49 AM

Thanks a lot EgzON , now i reached the GURU Status with over 200 reputation level .
  • 0

#10 Egz0N

Egz0N

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1155 posts

Posted 11 January 2009 - 02:53 PM

Thanks a lot EgzON , now i reached the GURU Status with over 200 reputation level .


you're welcome dude :)
  • 0

#11 shoaibbi

shoaibbi

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 15 January 2009 - 05:53 AM

gud one
  • 0

#12 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 15 January 2009 - 09:38 AM

you are welcome Bro. :)
  • 0




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download