资 源 简 介
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace Screencap
{
public class Capture
{
public enum CaptureTarget
{
Window,
Screen
}
public static Bitmap CaptureImage(CaptureTarget target, IntPtr windowHandle)
{
if (target == CaptureTarget.Window && windowHandle != IntPtr.Zero)
{
Rectangle rect = GetWindowRect(windowHandle);