2007-01-05

C#模仿QQ截图功能

来源: CSDN 作者:往事随风 评论 0 条
 
{
this.Bounds = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
this.BackgroundImage = CaptureScreenForm.windowFullScreen();

//
// 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.tiptext = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// tiptext
//
this.tiptext.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
this.tiptext.ForeColor = System.Drawing.Color.White;
this.tiptext.Location = new System.Drawing.Point(10, 10);
this.tiptext.Name = "tiptext";
this.tiptext.Size = new System.Drawing.Size(166, 140);
this.tiptext.TabIndex = 0;
this.tiptext.MouseMove = new System.Windows.Forms.MouseEventHandler(this.tiptext_MouseMove);
//
// MouseCaptureForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(456, 320);
this.Controls.Add(this.tiptext);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "MouseCaptureForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultBounds;
this.Text = "鼠标截屏";
this.TopMost = true;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.KeyDown = new System.Windows.Forms.KeyEventHandler(this.MouseCaptureForm_KeyDown);
this.Load = new System.EventHandler(this.MouseCaptureForm_Load);
this.DoubleClick = new System.EventHandler(this.MouseCaptureForm_DoubleClick);
this.ResumeLayout(false);

}


#endregion

/// <summary>
/// 重载MouseDown
/// </summary>
///
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown (e);
{
if(this.area == Rectangle.Empty && e.Button == MouseButtons.Left)
{
this.tiptext.Text = selectingString;
this.area.Location = new Point(e.X,e.Y);
}
this.pot = new Point(e.X,e.Y);
this.index = this.GetSelectedHandle(new Point(e.X,e.Y));
this.SetCursor();
共8页: 上一页 [1] [2] [3] [4] 5 [6] [7] [8] 下一页

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

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