2007-01-05

C#模仿QQ截图功能

来源: CSDN 作者:往事随风 评论 0 条
 

前阵子改了段C#截图功能的代码,现贴上来希望对大家有用

主文件

CaptureScreenForm.cs

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;

namespace CaptureScreen
{
/// <summary>
/// CaptureScreenForm 的摘要说明。
/// </summary>
public class CaptureScreenForm : System.Windows.Forms.Form
{
private System.Windows.Forms.PictureBox picbox;
private System.Windows.Forms.Button exitBtn;
private System.Windows.Forms.Button aboutBtn;
private System.Windows.Forms.Button ClearBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Button fullScreenBtn;
private System.Windows.Forms.Button mouseCaptureBtn;

public static Image image = null ;
private System.Windows.Forms.Panel panel1;

/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public CaptureScreenForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.picbox = new System.Windows.Forms.PictureBox();
this.fullScreenBtn = new System.Windows.Forms.Button();
this.mouseCaptureBtn = new System.Windows.Forms.Button();
this.ClearBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.aboutBtn = new System.Windows.Forms.Button();
this.exitBtn = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// picbox
//
this.picbox.Location = new System.Drawing.Point(0, 40);
this.picbox.Name = "picbox";
this.picbox.Size = new System.Drawing.Size(680, 312);
this.picbox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.picbox.TabIndex = 0;
this.picbox.TabStop = false;
//
// fullScreenBtn
//
this.fullScreenBtn.Location = new System.Drawing.Point(0, 0);
this.fullScreenBtn.Name = "fullScreenBtn";
this.fullScreenBtn.Size = new System.Drawing.Size(96, 32);
共8页: 上一页 1 [2] [3] [4] [5] [6] [7] [8] 下一页

(本文仅表明作者个人观点,不代表本站及其管理员立场.) 推荐 收藏 投稿 打印 返回 关闭
上一篇:Java应用web开发备用工具  
下一篇:详细讲述Java中的克隆
    评论加载中…
 推荐文章
     

网站首页  -  网站地图 -   站长论坛  -  网站投稿  -    -  网站管理
Copyright © 2008 芜湖站长站 All Rights Reserved 皖ICP备07500611号