fanovais
Meta Builder
LEVEL 1
300 XP
If you’ve got a problem with a program, you may be wondering how to show someone the errors you’re receiving. Luckily, taking a screenshot of your current display is just very simple in only pressing the 'PrintScreen' in your Keyboard. but there's one way to do this because we will make an application that captures your screen.
So, now let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add one Button named Button1 labeled as "Capture Screen". You must design your layout like this:
3. Next, put this code in Button1_Click so that it will capture your screen.
Explanation:
On
Error
GoTo
err
- this was the syntax that i had lectured a day ago. This syntax is for error handling that it will go to the variable err which will display "sorry unable to snap your screen and save at the moment please try again later".
Dim
shot As
Size =
New
Size(
My.
Computer
.
Screen
.
Bounds
.
Width
, My.
Computer
.
Screen
.
Bounds
.
Height
)
- this syntax initializes shot as the size of your computer screen. Last day I discussed about My namespace that it provides information regarding your computer.
Dim
grab As
New
Bitmap(
My.
Computer
.
Screen
.
Bounds
.
Width
, My.
Computer
.
Screen
.
Bounds
.
Height
)
- this syntax initializes to create an image that corresponds to the size of your screen that will pass through the variable grab.
Dim
s As
System.
Drawing
.
Graphics
=
System.
Drawing
.
Graphics
.
FromImage
(
grab)
- this syntax holds the image that we create using the variable 'grab'. This syntax also has the Graphics to be passed through the variable 's'.
The above syntax copies the image in your screen and will save as "screenshot.jpg". It will be saved also in your Debug Folder in your program and will display "Your screenshot was saved".
Now, click the Capture Button. It will display like the image below:
Next, Go to your Debug Folder and you will have your image.
Output:
Download the source code below and try it! :)
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz
Download
So, now let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add one Button named Button1 labeled as "Capture Screen". You must design your layout like this:

3. Next, put this code in Button1_Click so that it will capture your screen.
- On
Error
GoTo
err
- Dim
shot As
Size =
New
Size(
My.
Computer
.
Screen
.
Bounds
.
Width
, My.
Computer
.
Screen
.
Bounds
.
Height
)
- Dim
grab As
New
Bitmap(
My.
Computer
.
Screen
.
Bounds
.
Width
, My.
Computer
.
Screen
.
Bounds
.
Height
)
- Dim
s As
System.
Drawing
.
Graphics
=
System.
Drawing
.
Graphics
.
FromImage
(
grab)
- s.
CopyFromScreen
(
New
Point(
0
, 0
)
, New
Point(
0
, 0
)
, shot)
- grab.
Save
(
"screenshot.jpg"
)
- MsgBox
(
"Your screenshot was saved"
, MsgBoxStyle.
Information
)
- Me
.
Close
(
)
- err:
- MsgBox
(
"sorry unable to snap your screen and save at the moment please try again later"
, MsgBoxStyle.
Critical
, "Warning!"
)
- End
Sub
Explanation:
On
Error
GoTo
err
- this was the syntax that i had lectured a day ago. This syntax is for error handling that it will go to the variable err which will display "sorry unable to snap your screen and save at the moment please try again later".
Dim
shot As
Size =
New
Size(
My.
Computer
.
Screen
.
Bounds
.
Width
, My.
Computer
.
Screen
.
Bounds
.
Height
)
- this syntax initializes shot as the size of your computer screen. Last day I discussed about My namespace that it provides information regarding your computer.
Dim
grab As
New
Bitmap(
My.
Computer
.
Screen
.
Bounds
.
Width
, My.
Computer
.
Screen
.
Bounds
.
Height
)
- this syntax initializes to create an image that corresponds to the size of your screen that will pass through the variable grab.
Dim
s As
System.
Drawing
.
Graphics
=
System.
Drawing
.
Graphics
.
FromImage
(
grab)
- this syntax holds the image that we create using the variable 'grab'. This syntax also has the Graphics to be passed through the variable 's'.
- s.
CopyFromScreen
(
New
Point(
0
, 0
)
, New
Point(
0
, 0
)
, shot)
- grab.
Save
(
"screenshot.jpg"
)
- MsgBox
(
"Your screenshot was saved"
, MsgBoxStyle.
Information
)
The above syntax copies the image in your screen and will save as "screenshot.jpg". It will be saved also in your Debug Folder in your program and will display "Your screenshot was saved".
Now, click the Capture Button. It will display like the image below:

Next, Go to your Debug Folder and you will have your image.
Output:

Download the source code below and try it! :)
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz
Download
You must upgrade your account or reply in the thread to view hidden text.