Utils

using System;
using System.Drawing;
using System.Windows.Forms;

namespace zhbCapture
{
	/// <summary>
	/// Description of Utils.
	/// </summary>
	public class Utils
	{
		public static Bitmap screenBmp, srcScreenBmp;
		public static int screenWidth = Screen.PrimaryScreen.Bounds.Width;
		public static int screenHeight = Screen.PrimaryScreen.Bounds.Height;
		public static Size screenSize = Screen.PrimaryScreen.Bounds.Size;
        public static Point screenLocation = new Point(0, 0);
        public static Rectangle screenRect = new Rectangle(screenLocation, screenSize);
		public Utils()
		{

		}
		public static Bitmap getScreen(){

			Bitmap bitmap = new Bitmap(screenWidth, screenHeight);
			using (Graphics g = Graphics.FromImage(bitmap)) {
				g.CopyFromScreen(0,0,0,0,screenSize);
				return bitmap;
			}
		}
	}
}

  

Utils

时间: 2024-10-12 22:45:48

Utils的相关文章

Utils.java

package www.wulian1.com.webview; import java.text.SimpleDateFormat;import java.util.Date;import java.util.Locale; /** * Created by Administrator on 2017/5/22. */public class Utils { public static String getCurrentTime(String format) { Date date = new

org.quartz.utils.UpdateChecker Checking for available updated version of Quartz..

<dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.2.1</version> </dependency> <dependency> <groupId>org.quartz-scheduler</groupId> <artifact

org.hibernate.MappingException: Could not determine type for: java.utils.Date

问题描述 org.hibernate.MappingException: Could not determine type for: java.utils.Date, at table: STUDENTS, for columns: [org.hibernate.mapping.Column(DATE)] at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:349) at org.hibernate.mapping.Simp

java.lang.IllegalStateException: class utils.filter.ContentFilter is not a javax.servlet.Filter

1.错误描述 2016-01-12 11:27:01.787:WARN:oejuc.AbstractLifeCycle:FAILED ContentFilter: java.lang.IllegalStateException: class utils.filter.ContentFilter is not a javax.servlet.Filter java.lang.IllegalStateException: class utils.filter.ContentFilter is not

maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在

maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在 将jre/lib/rt.jar添加到maven的compiler里面  编译正常... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <versio

Could not initialize class utils.JdbcUtils

今天用JdbcUtils时出现了一个问题,被困扰了一晚上.从网上找的原因,说什么url错了,版本不一致等等都不能解决我的问题, 我写好了一个JdbcUtils准备测试,发现从后台用Dao测试完全没问题,但是servlet一调用就出现Could not initialize class utils.JdbcUtils: 早晨打开tomcat/webapps项目下发现mysql驱动放在XX/lib下:但WEB-INF下的lib没有MySQL驱动,但我明明把mysql驱动放在myeclipes的 WE

Knockout中ko.utils中处理数组的方法集合

每一套框架基本上都会有一个工具类,如:Vue中的Vue.util.Knockout中的ko.utils.jQuery直接将一些工具类放到了$里面,如果你还需要更多的工具类可以试试lodash.本文只介绍一下Knockout中ko.utils中处理数组的一些方法. ko.utils.arrayForEach(array, callback) 与Array.prototype.forEach作用一致.提供函数(回调函数)对数组的每个元素执行一次.使用方法: var arr = [1, 2, 3, 4

Javascript Utils.js

\ var Utils = { //字符串格式化 StringFormat: function () { if (arguments.length == 0) return null; var str = arguments[0]; for (var i = 1; i < arguments.length; i++) { var re = new RegExp('\\{' + (i - 1) + '\\}', 'gm'); str = str.replace(re, arguments[i]);

Utils工具方法集插件详解

var Utils = function(){}; Utils.text = { stripTags: function (val) { return val.replace(/<\/?[^>]+>/gi, "");   //正则表达式中的<\/?其实就是匹配</或<,后面的[^>]+其实就是匹配不是>的任何一个或多个字符,因此此正则可以匹配<div>,</div>,<input type="tex