Program a Screen-Capture Tool in C#
Develop a screen-grab tool using C# and the Windows API
Watch Promo
Create a screen-capture tool in C#.
This is a course for intermediate-level C# programmers looking for a project to extend their knowledge.
In this course you will develop programs that do all the following:
- Grab an image of the entire screen
- Grab an image of a selected window
- Grab an image from a second or third monitor
- Mark an area of the screen with the mouse and grab that area
- Add an image of the mouse pointer to grabbed images
- Calculate screen coordinates and offsets
- Save images to disk in various image formats
- Create hotkeys to trigger the screen-capture from any application
- Use forms and picture boxes to display images
- Use Windows API functions to add extra features to C#
- Use file dialogs to save and load images
- Create transparent and translucent windows
- Make forms draggable using API functions
- Override the Windows Procedure to handle events
This is a project-based course that comes with all the source code ready-to-run. It provides a great way for C# programmer to move beyond the basics to explore the development of more complex C# applications.
Your Instructor
Huw Collingbourne has been a programmer for more than 30 years. He is a well-known technology writer in the UK. For over ten years he wrote the Delphi and Object Pascal programming column for PC Plus Magazine. He has also written numerous opinion and programming columns (including tutorials on C, C#, Java, Smalltalk, Delphi and Ruby) for a number of computer magazines, such as Computer Shopper, Flash & Flex Developer’s Magazine, PC Pro, and PC Plus.
He is author of a number of books on programming topics published by Bitwise Books: http://www.bitwisebooks.com.
In the 1980s he was a pop music journalist and interviewed most of the New Romantic stars, such as Duran Duran, Spandau Ballet, Adam Ant, Boy George, and Depeche Mode. He is now writing a series of New Romantic murder mysteries.
At various times Huw has been a magazine publisher, editor, and TV broadcaster. He has an MA in English from the University of Cambridge and holds a 2nd dan black belt in aikido, a martial art which he teaches in North Devon, UK (http://hartlandaikido.co.uk/). The aikido comes in useful when trying (usually unsuccessfully) to keep his Pyrenean Mountain Dogs under some semblance of control.
Course Curriculum
-
PreviewWelcome to the course (2:15)
-
PreviewWhat you will learn from this course (3:02)
-
StartReadMe
-
StartCode Archive [Download]
-
StartA Simple Screen-Grabber (6:59)
-
StartPausing Before Screen Capture (3:44)
-
StartSaving Images (3:15)
-
StartUsing Windows API functions (4:49)
-
StartGrabbing an image of a selected window (5:17)
-
StartGrabbing an image from a secondary screen (5:21)
-
StartX and Y positions on Multi-screen systems (3:46)
-
StartUsing a Picture Box (4:59)
-
StartAdding a Save File Dialog (2:51)
-
StartUsing File Dialogs (5:27)
-
StartSelecting Image Formats (3:04)
-
PreviewMaking the screen-grab tool more useful (1:49)
-
StartSelecting and Capturing an Area of Screen (5:38)
-
StartMaking a Form Transparent (3:10)
-
StartMaking a Transparent Form Draggable (6:29)
-
StartCompatibility with different Windows versions (5:19)
-
StartGrabbing The Mouse Pointer (4:26)
-
StartDrawing the Mouse Cursor (4:19)
-
StartCreating Hotkeys (2:15)
-
StartRegistering Hotkeys (2:46)
-
StartWndProc – What is a Windows Procedure (3:55)
-
StartBringing a Window to Front (4:53)
-
StartAdding The Finishing Touches (4:45)
-
StartGoing Further (2:42)