/// <summary> /// 截取屏幕 /// </summary> /// <param name="x">起点x坐标</param> /// <param name="y">起点y坐标</param> /// <param name="width">截取宽度</param> /// <param name="height">截取高度</param> /// <returns></returns> private void capturescreen(double x, double y, double width, double height) { int ix = convert.toint32(x); int iy = convert.toint32(y); int iw = convert.toint32(width); int ih = convert.toint32(height); system.drawing.bitmap bitmap = new system.drawing.bitmap(iw, ih); system.drawing.graphics graphics = system.drawing.graphics.fromimage(bitmap); graphics.copyfromscreen(ix, iy, 0, 0, new system.drawing.size(iw, ih)); graphics.dispose(); }
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!
网友评论