Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a Windows Forms app that needs a screenshot of a known screen rectangle, use System.Drawing.Graphics.CopyFromScreen to copy those pixels into a bitmap. If users need to choose a display or application window, use Windows.Graphics.Capture instead: it opens Windows system UI for the selection and provides capture frames for snapshots or streams. These are Windows-specific approaches, not cross-platform C# screenshot APIs.

Choose the right C# screenshot method

Need Use What it does
Capture a known rectangle in a Windows Forms app Graphics.CopyFromScreen Copies screen pixels from the coordinates and dimensions you specify into a drawing surface, such as a bitmap.
Let the user choose a display or application window Windows.Graphics.Capture Uses secure system UI to select a target and supplies frames that your app can process into a snapshot or stream.
Take a screenshot manually, outside your app Snipping Tool or Print Screen Uses Windows’ built-in interactive or keyboard-based screenshot tools.

The choice is about workflow, not a universal performance ranking. Microsoft’s documentation describes distinct capture models but does not establish a full performance, target-framework, or Windows-version comparison.

Capture a screen rectangle with CopyFromScreen

CopyFromScreen performs a bit-block transfer of color data from the screen to a Graphics drawing surface. Your code chooses the source rectangle and the destination surface. This is appropriate when your app already knows which on-screen region to copy, as in a Windows Forms workflow.

Complete Windows Forms example

The following method captures a rectangle and saves it as a PNG. Add it to a Windows Forms project that targets Windows and references System.Drawing. The coordinates and size are supplied by the caller; this example does not determine the location of a window for you.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
LAPGEAR Home Office Pro Lap Desk - Black Carbon, Fits 15.6” Laptops
  • Spacious Design: Measuring 21.1" wide and 14.1" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
  • Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy ergonomic support with the integrated cushioned wrist rest.
  • Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
  • Durable Surface: Work with confidence on our lap desk's solid surface, featuring a sleek black carbon color, ensuring optimal air circulation to prevent your laptop from overheating.
  • On-the-Go Convenience: With an integrated handle and lightweight design (2.8 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
using System.Drawing;

public static void SaveScreenRectangle(
    int left,
    int top,
    int width,
    int height,
    string outputPath)
{
    if (width <= 0) throw new ArgumentOutOfRangeException(nameof(width));
    if (height <= 0) throw new ArgumentOutOfRangeException(nameof(height));

    using var bitmap = new Bitmap(width, height);
    using (var graphics = Graphics.FromImage(bitmap))
    {
        graphics.CopyFromScreen(
            sourceX: left,
            sourceY: top,
            destinationX: 0,
            destinationY: 0,
            blockRegionSize: new Size(width, height));
    }

    bitmap.Save(outputPath, System.Drawing.Imaging.ImageFormat.Png);
}

Call it with the screen-space origin and dimensions you intend to capture:

SaveScreenRectangle(100, 100, 800, 600, "capture.png");

This example selects a rectangle of visible screen pixels. It is not a direct rendering of a form’s controls: if a form is minimized, obscured, or otherwise not showing the pixels you expect, a screen-pixel copy is not a substitute for rendering its contents. Microsoft’s WinForms example likewise creates a bitmap, obtains a Graphics surface for it, and copies a chosen on-screen area.

Coordinates, dimensions, and output

  • Choose the source rectangle deliberately. The API needs the source coordinates and capture size. A rectangle that is too small clips content; one that is too large includes surrounding desktop pixels.
  • Choose a destination surface. The sample creates a bitmap exactly the size of the requested rectangle, then copies to destination origin (0, 0).
  • Choose an image format. The example saves PNG. The API copies pixels to the drawing surface; saving the bitmap is a separate step.
  • Dispose drawing resources. The using statements release the bitmap and graphics surface after saving.

The Graphics.CopyFromScreen API reference documents overloads that take source and destination points plus a size, or explicit source and destination coordinates plus a size. It also documents Win32Exception when the operation fails.

Rank #2
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Let the user pick a window or display with Windows.Graphics.Capture

Use Windows.Graphics.Capture when the target should be selected through Windows’ system picker rather than hard-coded as a screen rectangle. Microsoft describes the API as acquiring frames from a display or application window for snapshots or video streams. The system UI lets the user select what to capture; a yellow notification border appears around the item being captured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check support and request a target

Check GraphicsCaptureSession.IsSupported() before starting a capture session. Support can be unavailable for multiple reasons, including hardware requirements, so handle the unsupported case instead of assuming every device can capture.

using Windows.Graphics.Capture;

if (!GraphicsCaptureSession.IsSupported())
{
    // Show an explanation or offer a manual screenshot workflow.
    return;
}

var picker = new GraphicsCapturePicker();
GraphicsCaptureItem? item = await picker.PickSingleItemAsync();

if (item is null)
{
    // The user dismissed the picker without selecting an item.
    return;
}

// Pass item to your capture startup code.

This shows the support check and picker request, not a complete frame-processing application. After selection, your app passes the resulting GraphicsCaptureItem to its capture startup logic, then uses the acquired frames to create the snapshot or stream it needs.

Rank #3
Sale
Yilador Webcam Cover 3 Pack, 0.03 inch Ultra Thin Laptop Camera Cover Slide
  • Note: Not suitable for MacBooks released after 2023 or devices with a protruding front camera; Not applicable to full-screen or notch-style tempered glass screen protectors; Do not use on the rear camera of the phone.
  • 💻 Why Do You Need a Webcam Cover Slide? — Safeguard your privacy by covering your webcam with our reliable webcam cover when not in use. Don't let anyone secretly watch you. Stay protected!
  • ✅ Thin & Stylish — Enhance your laptop's functionality and aesthetics with our 0.027" ultra-thin webcam covers. Seamlessly close your laptop while adding a touch of sophistication.
  • ✅ Fits Most Devices — Compatible with laptops, phones, tablets, desktops! Keep your privacy intact on Ap/ple, Mac/Book, iPh/one, iP/ad, H/P, L/novo, De/ll, Ac/er, As/us, Sa/msung devices.
  • ✅ 365 Days Protection — Our upgraded 3.0 adhesive ensures a strong hold that won't damage your equipment. Experience reliable, long-term privacy protection day in and day out.

WinUI 3 picker initialization

For WinUI 3, Microsoft specifically requires initializing the picker with the app window handle before calling PickSingleItemAsync. That setup is specific to WinUI 3; do not treat it as a requirement for every C# app. Follow the Windows app screen-capture guidance for the window-handle initialization pattern for your WinUI 3 version.

Platform scope

Microsoft’s screen-capture guidance describes support for Windows desktop devices and Windows Mixed Reality immersive headsets. The cited documentation does not establish a complete minimum Windows version, nor a cross-platform C# alternative. Confirm the API requirements for the specific SDK and target framework in your project before choosing this route.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Take a screenshot manually in Windows

If you do not need your C# program to create the image, Windows’ built-in tools may be simpler. Microsoft Support documents Snipping Tool and Print Screen workflows; Alt+Print Screen copies the active window. The Snipping Tool developer documentation also describes launching interactive rectangle, freeform, and window capture modes. For image capture, specify exactly one mode parameter.

Rank #4
AboveTEK Portable Laptop Lap Desk w/Retractable Left/Right Mouse Pad Tray, Non-Slip Heat Shield Tablet Notebook Computer Stand Table w/Sturdy Stable Work Surface for Bed Sofa Couch or Travel
  • Anti-Slip Surface - Transform your laptop into a mobile workstation with the AboveTEK portable laptop lap desk. The anti-slip surface provides a strong grip for laptops up to 15.6 inches(Diagonal), while the double rubber strip on the bottom ensures a stable display or typing experience on your lap, couch, or bed.
  • Retractable Mouse Pad - Retractable laptop mouse pad extends on both directions for the left/right handed with elevation along the edges for stopping mouse from falling off. The size of laptop tray is 14" X 9.7" and the size of mouse pad is 7.4" X 6.1".
  • Effective Heat Shield - The effective heat shield made of sturdy and thick material protects your laptop from overheating. Prioritizes your comfort and safety, an ideal lap pad or board for working anywhere.
  • EASY to Carry and Store - With an ergonomic and simplistic design, the lap desk is portable to store in a backpack. Only 15" in size, 2.2 lb of weight and with slim 0.6 inch thickness, it is ready to be easily carried around.
  • Widely Applicable - The smooth platform accommodates laptops and tablets up to 15.6 inches(Diagonal), making it a versatile accessory and one of the best gifts for mom, dad, students and professionals. Perfect for use as a laptop bed tray or tablet holder anywhere at home, library, or park.

This manual route is useful for a person collecting a screenshot, but it does not give your application an image to process unless you add a separate way to obtain that image.

Or skip the browser setup

If the screenshot you need is of a web page, ScreenshotNeo can capture it with one GET request; you do not need to set up a browser for the capture. Its API accepts a URL and returns PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation for parameters and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers indicate the page verdict and whether the request was billed. Its MCP server includes take_screenshot, get_page_info, and capture_pdf tools for AI agents using Claude, Cursor, or another MCP client. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Best Value
Sale
LAPGEAR Home Office Lap Desk – Pink, Fits 15.6” Laptops
  • Spacious Design: Measuring 21.1" wide and 12" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
  • Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy laptop support with the integrated device ledge.
  • Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
  • Durable Surface: Work with confidence on our lap desk's solid surface, featuring a blush pink color, ensuring optimal air circulation to prevent your laptop from overheating.
  • On-the-Go Convenience: With an integrated handle and lightweight design (2.14 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common capture problems

The saved image is blank, clipped, or captures the wrong area

  • Cause: The source coordinates or dimensions do not match the on-screen rectangle you meant to capture.
  • Fix: Check the source origin and width/height passed to CopyFromScreen. Remember that the method copies pixels at the selected screen location; it does not locate a window or render its controls.

CopyFromScreen fails with a Win32Exception

  • Cause: Microsoft documents Win32Exception as an operation failure for this API; the exception itself does not identify one universal cause.
  • Fix: Catch and log the exception, verify the requested rectangle and target drawing surface, and provide a failure path rather than saving an assumed-valid image.

The picker route is unavailable

  • Cause: GraphicsCaptureSession.IsSupported() returns false when capture is unsupported on the device; hardware requirements are among the documented reasons.
  • Fix: Check support before opening the picker and explain that capture is unavailable. Do not assume a particular Windows version is sufficient based only on the general API name.

The picker opens but no item is returned

  • Cause: The user can dismiss the picker without making a selection.
  • Fix: Treat a null result as cancellation and leave the app in a usable state.

WinUI 3 cannot launch the picker correctly

  • Cause: WinUI 3 requires the picker to be initialized with the window handle before PickSingleItemAsync.
  • Fix: Add the WinUI 3-specific initialization before invoking the picker. Do not apply that instruction indiscriminately to unrelated app frameworks.

Performance, reliability, and cost considerations

The cited Microsoft documentation defines what each API captures, but does not provide comparative speed benchmarks or a guarantee that one route is more reliable in every app. For CopyFromScreen, the requested rectangle determines how much screen content you copy and the bitmap you create. For picker-based capture, check support and handle cancellation as ordinary outcomes. For either method, test the actual target workflow on the Windows devices and configurations you intend to support.

These APIs are part of Windows development rather than a per-screenshot commercial service in the documented workflows. If you instead need URL-based website screenshots, ScreenshotNeo’s published plans are Free: 1,000 shots/month; Starter: $5 for 3,000; Growth: $15 for 15,000; Pro: $39 for 60,000; Scale: $99 for 250,000; Business: $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. Those service prices are separate from using Windows capture APIs in your own app.

Frequently asked questions

Can I use CopyFromScreen to capture a window that is behind another window?

CopyFromScreen copies pixels from the screen at the rectangle you specify. It is not a window-content renderer, so it does not promise the unobscured contents of a covered window.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does Windows.Graphics.Capture automatically save a PNG?

The API supplies capture frames; your application’s capture and processing logic must turn those frames into the snapshot or stream it needs.

Is there a cross-platform C# screenshot method in these Windows APIs?

No cross-platform alternative is established by the Microsoft Windows API documentation described here. Treat both approaches as Windows-specific unless you select and verify a separate platform-specific solution.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.