[Tutorial]ScreenShots No Api

Posts 1–7 of 7 · Page 1 of 1
[Tutorial]ScreenShots No Api
Screenshots, No API

Using Sendkeys to perforam a Screenshot without Windows API

First, As always open VB.net and follow along

--- Create a new windows Application

--- You will need to add

---- Picture Box

---- Status Bar

---- Split Button (which will be in the status bar)

---- Panel

----Timer

Add, a menu to the split button on the taskbar that says "ScreenShot"

Note: Dock the panel full, we use this so the picture box stretches with the form.

  • Dock the PictureBox inside the panel..

If you set it up as mentioned above, You should have something that looks like this


--- Double Click the Menu Item inside your Split button and add this code

[php]
'Min Form
Me.WindowState = FormWindowState.Minimized
'Hide the form (so it isn't in the screenshot
Me.Hide()
' This enables the timer which handles the events
timer1.Enabled = True
[/php]

Now double click your timer and add this

[php]
'Press Print Screen
SendKeys.Send("{%}({PRTSC})")
'Grab the image from the keyboard
picturebox1.Image = CType(Clipboard.GetDataObject.GetData("Bitmap"), Image)
'Set the form to visible again
Me.Show()
'Normalize the form
Me.WindowState = FormWindowState.Normal
'timer stop
Timer1.Stop()
'disables the timer
Timer1.Enabled = False
[/php]

---- Start your project , Click the button

---- Get a screenshot

Enjoy
great as always
Simply Amazing !!!!!
I never though of that way. Good job next!
so how does this help us is it faster or does it upload it to a image sharing website
Quote Originally Posted by hopefordope View Post
so how does this help us is it faster or does it upload it to a image sharing website
It is just easier i guess. I have another code that takes a screen shot and allows you to specify where to save it.
It is easier, A few lines of code, Yo can add the ability to upload it to a web host , it would be a good addition
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us