Click here to Skip to main content
6,305,776 members and growing! (17,966 online)
Email Password   helpLost your password?
Languages » VB.NET » Applications     Intermediate License: The Code Project Open License (CPOL)

Screen Shot Application

By VBDT

Screen Shot is a simple application that allows a user to quickly capture images from the screen and save them in a user predefined folder
VB 8.0.NET 2.0, WinXPVS2005, Dev
Posted:30 Jun 2007
Updated:28 Jun 2008
Views:46,153
Bookmarked:97 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
30 votes for this article.
Popularity: 5.16 Rating: 3.49 out of 5
4 votes, 13.8%
1
6 votes, 20.7%
2
1 vote, 3.4%
3
2 votes, 6.9%
4
16 votes, 55.2%
5

Introduction

Screen Shot has been created with Visual Basic.NET 2005. The application is user friendly and easy to use. It allows the user to capture still images from the screen and save them into the user predefined folder. I find it very useful with some music visualizations when I need to take screen shots.

Screen Shot Feature List

  1. Full screen image capture (all monitors).
  2. Object capture. The object can be window, control, Windows shortcut menu etc.
  3. Rectangle-area image capture from the screen.
  4. Clipboard image capture.
  5. Active window image capture (with a hot key).
  6. User defined application hot keys.
  7. All these captured images are (automatically or manually) saved into the user defined folder or clipboard.
  8. All the capture methods mentioned above will capture transparent images from the screen.
  9. JPG Image quality setting.
  10. Can save the image in many image formats.
  11. Easy menu access (optional).
  12. Plays sound when the image is captured (optional).
  13. Automatically notifies for application updates (optional).
  14. Starts the Screen Shot automatically when the system starts (optional).
  15. Help (help file).

Screen Shot Main Menu

The main menu has five buttons, which I will explain in the order shown below. The menu is located on the top-center of the screen that hides itself when it loses the mouse focus.

Screenshot - Menu
Screenshot - Mode Button

Capture Mode

The first button is the Capture Mode button. In Screen Shot, to capture an image the capture mode should be set first. The button is a split-dropdown button that has the following items:

Screenshot - Mode Menu

As you can guess from the above picture, the first dropdown item sets the "Full Screen" capture mode, the second sets the "Object" capture mode and the third one sets the "Rectangle" area capture mode.

The fourth menu item is not for setting the capture mode but for capturing the clipboard image. After selecting the desired capture mode, you will notice that the "Mode" button's image is changed to the menu item's image that was selected, stating the current capture mode. See the Screen Shot help for the detailed instructions of how to set the capture mode or capture an image from the screen.

Screenshot - Full Screen Menu Item

The "Full Screen" dropdown menu item will set the capture mode to the full screen by changing the "Mode" button's image. Clicking the "Mode" button one more time will capture the image of the full screen (all monitors in one image) or you could use the "Capture Mode" hot key.

Screenshot - Object Menu Item

The "Object" dropdown menu item will set the capture mode to object by changing the "Mode" button's image. Clicking the "Mode" button one more time will start the capture of an object on the screen. The objects can be windows, controls, the desktop, shortcut menus, etc. When you start the object capture and point the mouse to an object, you will see a red rectangle that is drawn around the object. You can capture the object with in the red rectangle by simply clicking anywhere inside the red rectangle or you could use the "Capture Mode" hot key.

Screenshot - Object Capture

Screenshot - Rectangle Menu Item

The "Rectangle" dropdown menu item will set the capture mode to the rectangle by changing the "Mode" button's image. Clicking the "Mode" button one more time will place the rectangle and the "Tool Box" forms on the screen.

Screenshot - Rectangle Capture

Screenshot - Clipboard Menu Item

The last dropdown menu item is for capturing clipboard images. If "Clipboard" menu item is enabled, than by clicking on it will get the clipboard image so that the user can save it into a file. Note that the clipboard should contain an actual image, not a path.

Screenshot - Clipboard Menu

Screenshot - Image Folder Button

Image Folder

The second button is the "Image Folder" button that opens the Screen Shot image folder in Windows Explorer.

Screenshot - Exit Button

Exit

The third button is the "Exit" button that will exit the application.

Screenshot - Options Button

Options

The fourth button opens the application’s "Options" window. In here, you can set or create the image folder, whether you want to access the menu instantly by hovering the mouse at the top edge of the screen, specify if the capturing sound should be played when an image is captured, specify if the Screen Shot application should start when the system starts, specify the captured image file settings and properties, and finally, define application hot keys and many more.

Screenshot - Options Window

Screenshot - Help Button

Help

The fifth button is the "Help" dropdown button.

Screenshot - Help Menu

Background

The application is written in VB.NET 2005 and uses some API functions to implement the still image captures. All of the capture methods use the application-defined methods to capture the images. For example, if you press the "Print Screen" keyboard key, Windows will capture the desktop image and place it on clipboard by default. However, when using this application it will change this behavior and capture and save the image directly to the image folder. This also means that you will be able to capture transparent windows on the desktop, whereas Windows' default capture doesn't capture transparent windows as transparent.

Since this is an application and it is a big project that uses many of my own components and classes I can't go in to details. This project is an assembly of different classes that I made over a period of time. For example it uses the Shape class to make the menu form's corners rounded; or another one of my components WindowsHookLib that hooks the mouse and the keyboard to help capturing an image. As you can see, the project is huge so I decided to include all the relevant source files in case of need. The most important class that allows capturing the images is ICapture. This class is the base of this application and you can find it in the source files. Almost all the classes are commented so they should be self-explanatory.

System Requirements

  • Windows NT/2000/XP (tested only on XP)
  • Framework 2.0
  • Note: It might not work on XP x64 system.

Screen Shot Information

History

  • 30th June, 2007 -- Original version posted
  • 16th July, 2007 -- Article and downloads updated (version 3.0.3.0)
  • 28th June, 2008 -- Article and downloads updated (version 3.1.2.0)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

VBDT


Member

Occupation: Software Developer (Senior)
Location: United States United States

Other popular VB.NET articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 34 (Total in Forum: 34) (Refresh)FirstPrevNext
GeneralReally good work PinmemberJohnny J.23:13 22 Apr '09  
GeneralCritical Error/Bug in latest version... [modified] PinmemberAssaultEX10:05 19 Apr '09  
GeneralI have one question. PinmemberMember 17881308:34 2 Feb '09  
GeneralMy vote of 2 Pinmemberrobertjb209:21 25 Jan '09  
GeneralNo project file, many compilation errors Pinmemberrobertjb209:15 25 Jan '09  
GeneralMy vote of 2 PinmemberFatCatPizza4:59 25 Jan '09  
QuestionHmmm Project Pinmemberstevie_mac17:50 18 Jul '08  
QuestionError on Startup ... PinmemberMartin081523:04 29 Jun '08  
AnswerRe: Error on Startup ... PinmemberVBDT15:38 30 Jun '08  
GeneralRe: Error on Startup ... PinmemberMartin081522:13 30 Jun '08  
GeneralRe: Error on Startup ... PinmemberMartin081522:26 30 Jun '08  
AnswerRe: Error on Startup ... Pinmembertosch5:03 1 Jul '08  
GeneralRe: Error on Startup ... Pinmemberrenzska8:24 8 Oct '08  
GeneralRe: Error on Startup ... PinmemberVBDT22:35 29 Oct '08  
AnswerRe: Error on Startup ... PinmemberVBDT22:40 29 Oct '08  
GeneralRe: Error on Startup ... PinmemberMartin08150:52 30 Oct '08  
Generaldoes this also capture video display? PinmemberNoel Dacara18:07 20 May '08  
Generalsource code PinmemberAshley Staggs7:59 25 Apr '08  
Generalplzz help Pinmemberscorpan_44799:11 3 Apr '08  
GeneralFull source code PinmemberGlimmerMan4:29 16 Jan '08  
General[Message Removed] PinmemberMojtaba Vali22:56 1 Jan '08  
Generalnice project Pinmembermb2481200623:44 11 Sep '07  
GeneralRe: nice project PinmemberVBDT16:24 12 Sep '07  
QuestionRectangle Form PinmemberBrent D Stringer19:32 19 Aug '07  
GeneralVisual Studios PinmemberNoobsa4418:43 20 Jul '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 28 Jun 2008
Editor: Deeksha Shenoy
Copyright 2007 by VBDT
Everything else Copyright © CodeProject, 1999-2009
Web19 | Advertise on the Code Project