Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Screen Shot Application

0.00/5 (No votes)
24 Sep 2010 1  
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.

Introduction

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

Screen Shot Feature List

  1. Full screen image capture (all monitors)
  2. Object capture. The object can be a window, control, Windows shortcut menu, etc.
  3. Rectangle-area image capture from the screen
  4. Full web page image capture
  5. Clipboard image capture
  6. Active window image capture (with a hot key)
  7. User defined application hot keys
  8. All these captured images are (automatically or manually) saved into a user defined folder or clipboard
  9. All the capture methods mentioned above will capture transparent images from the screen
  10. JPG image quality setting
  11. Can save images in many image formats
  12. Can capture a screen image with the cursor included (optional)
  13. Easy menu access (optional)
  14. Plays sound when an image is captured (optional)
  15. Automatically notifies for application updates (optional)
  16. Starts automatically when the system starts (optional)
  17. 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, and hides itself when it loses 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, indicating the current capture mode. See Screen Shot help for 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 Full Screen by changing the "Mode" button's image. Clicking the "Mode" button once more 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 once more will start the capture of an object on the screen. The object can be a window, controls, the Desktop, shortcut menus, etc. When you capture the object and point the mouse to an object, you will see a red rectangle that is drawn around the object. You can capture the object within 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 Rectangle by changing the "Mode" button's image. Clicking the "Mode" button once more 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 the "Clipboard" menu item is enabled, 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 the 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 rewritten in VB.NET 2008, and uses some API functions to implement the still image captures. All of the capture methods use application-defined methods to capture images. For example, if you press the "Print Screen" keyboard key, Windows will capture the desktop image and place it on the 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 into 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, and another one of my components, WindowsHookLib, that hooks the mouse to help capture an object image. Of course I needed to provide some hot key support for the application, for this I used one of my other classes Hotkeys class which provides a complete hot key solution. 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 images is SCapture. 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 98/2000/XP/Vista/Windows 7
  • Framework 3.5 SP1

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)
  • 30th July, 2009 -- Article and downloads updated (version 3.1.3.6)
  • 23rd Sep, 2010 -- Article and downloads updated (version 3.1.5.2)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here