//
// 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();
评论加载中…
![]() |