using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace CreateWindows
{
/// <summary>
///myform的摘要说明
/// </summary>
public class TestForm : System.Windows.Forms.Form
{
/// <summary>
/// 必须的容器变量设置
/// </summary>
private System.ComponentModel.Container components = null;
public TestForm()
{
InitializeComponent();
}
/// <summary>
/// 清除所有正在被使用的资源
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose(); }
}
base.Dispose(disposing);
}
# region Windows Form Designer generated code
/// <summary>
/// 设计器所支持的方法 不要使用代码编辑器修改
/// </summary>
private void InitializeComponent()
{
this.autoScaleBaseSize = new System.Drawing.Size(5, 15);
this.BackColor = System.Drawing.Color.Brown;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "TestForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "测试窗体";
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TestForm_MouseDown);
this.Move += new System.EventHandler(this.TestForm_Move);
}
#endregion
/// <summary>
/// 应用程序主程序介入点
/// </summary>
// public static void Main()
// {
// Application.Run(new TestForm());
// }
private void TestForm_MouseDown(object sender, System.Windows.Forms.MouseEventHandler e)
{
this.Text = "鼠标被按下";
}
private void TestForm_Move(object sender, System.EventHandler e)
{
this.Text = "窗体被移动";
}
}
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace CreateWindows
{
/// <summary>
///myform的摘要说明
/// </summary>
public class TestForm : System.Windows.Forms.Form
{
/// <summary>
/// 必须的容器变量设置
/// </summary>
private System.ComponentModel.Container components = null;
public TestForm()
{
InitializeComponent();
}
/// <summary>
/// 清除所有正在被使用的资源
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose(); }
}
base.Dispose(disposing);
}
# region Windows Form Designer generated code
/// <summary>
/// 设计器所支持的方法 不要使用代码编辑器修改
/// </summary>
private void InitializeComponent()
{
this.autoScaleBaseSize = new System.Drawing.Size(5, 15);
this.BackColor = System.Drawing.Color.Brown;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "TestForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "测试窗体";
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TestForm_MouseDown);
this.Move += new System.EventHandler(this.TestForm_Move);
}
#endregion
/// <summary>
/// 应用程序主程序介入点
/// </summary>
// public static void Main()
// {
// Application.Run(new TestForm());
// }
private void TestForm_MouseDown(object sender, System.Windows.Forms.MouseEventHandler e)
{
this.Text = "鼠标被按下";
}
private void TestForm_Move(object sender, System.EventHandler e)
{
this.Text = "窗体被移动";
}
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货