Jump to content

VB 9.0 How to make a Screenshot Tool

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
23 replies to this topic

#1
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
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



#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Very neat tutorial! +rep

#3
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,675 posts
good tutorial mendim, you are doing a nice job with these new tutorials
remind me to +rep you later because i cant now
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

    Programmer

  • Members
  • PipPipPipPip
  • 173 posts
Nice man, I like it +rep

#5
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts

Jordan said:

Very neat tutorial! +rep

amrosama said:

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

SaintLion said:

Nice man, I like it +rep


Thanks a lot .. :D

#6
Egz0N

Egz0N

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,034 posts
nice one mendim. .. don't forget to remind me to +rep you when it lets me to :)

#7
whitey6993

whitey6993

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 437 posts
Awesome tutorial. +rep

#8
Egz0N

Egz0N

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,034 posts
now i can +rep you .. i think this +rep gonna make you GuRu .. Congrats .. :)

#9
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
Thanks a lot EgzON , now i reached the GURU Status with over 200 reputation level .

#10
Egz0N

Egz0N

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,034 posts

mendim. said:

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

you're welcome dude :)

#11
shoaibbi

shoaibbi

    Newbie

  • Members
  • PipPip
  • 15 posts
gud one

#12
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
you are welcome Bro. :)