Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Program a Screen-Capture Tool in C#
Rating: 4.6 out of 5(36 ratings)
481 students

Program a Screen-Capture Tool in C#

Develop a screen-grab tool using C# and the Windows API
Last updated 8/2019
English

What you'll learn

  • Develop a functional and useful screen-grab tool.
  • Understand how to import Windows API functions.
  • Be able to deal with screen-handling even on multi-monitor systems.
  • Understand hotkeys that trigger actions throughout Windows.
  • Understand the Windows Procedure (WndProc).

Course content

2 sections28 lectures1h 47m total length
  • Welcome to the course2:15

    Before you begin, be sure you know what software and experience you need to follow this course

  • What You will Learn from This Course3:02

    From screen capture to the Windows API. This is what you’ll learn.

  • ReadMe0:05

    This ReadMe file provides guidance on more sources of information which you may find of use when following this course.

  • Source Code Archive [Download]0:10

    Source code download

  • A Simple Screen-Grabber6:59

    First steps to creating a screen-capture tool.

  • Pausing Before Screen Capture3:44

    How to wait before initiating a screen-grab

  • Saving images3:15

    How to save a screen-grab to disk.

  • Using Windows API functions4:49

    How to import functions from DLLs

  • Saving an image of a selected window5:17

    How can you save an image of just one window?

  • Saving an image from a secondary screen5:21

    But what if the computer has more than one monitor?

  • X and Y positions on Multi-screen systems3:46

    Calculating screen-offsets

  • Using a PictureBox4:59

    A better way to display images

  • Adding a Save File Dialog2:51

    Let the user select file names

  • Using File Dialogs5:27

    Save and Load dialogs and how to configure them

  • Selecting Image Formats3:04

    Save images in various standard formats

  • Screen Capture

Requirements

  • Basic knowledge of C# programming (complete beginners should first study my ‘Learn C# Programming’ course)
  • Visual Studio (free or commercial edition).

Description

Create a screen-capture tool in C#. In this course you will follow the development of a complete project from the ground up. You will end up with a utility that grabs images from screen and saves them to disk in multiple image formats.

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# programmers to move beyond the basics to explore the development of more complex  C# applications.

Who this course is for:

  • Intermediate C# programmers looking for a project to extend their knowledge
  • C# programmers who want to learn to use the Windows API
  • Programmers wanting to understand screen-handling and image capturing