private Bitmap CaptureScreen1()
{
int screenWidth = Screen.PrimaryScreen.Bounds.Width;
int screenHeight = Screen.PrimaryScreen.Bounds.Height;
System.Drawing.Rectangle bounds = GetScreenBounds();
Bitmap bitmap=new Bitmap(bounds.Width, bounds.Height);
using (Graphics graphics = Graphics.FromImage(bitmap))
{
graphics.CopyFromScreen(System.Drawing.Point.Empty, System.Drawing.Point.Empty,bounds.Size);
}
return bitmap;
}
private Bitmap CaptureScreen2()
{
//处理分辨率问题
System.Drawing.Rectangle bounds =Screen.PrimaryScreen.Bounds;
float dpiX,dpiY;
using (Graphics graphics = Graphics.FromHwnd(IntPtr.Zero))
{
dpiX =