c#中 的问题,上网找了很久都没找着,希望这里能有人帮我

来源:百度知道 编辑:UC知道 时间:2024/06/28 19:48:39
在c#中有很多事件

我想问有没有这样一个事件

只要光标在textbox里面就能出发的事件呢??

private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
System.Windows.Forms.Timer timer;
float time = 0;

...中间代码略...

#region Windows 窗体设计器生成的代码

/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
......
this.timer = new System.Windows.Forms.Timer(this.components);
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();

//
//timer Timer是一个定时器,固定时间触发某函数
//
this.timer.Enabled = true; //该定时器启用。
this.timer.Interval = 50; //定时器触发间隔时间50毫秒。
this.timer.Tick += new System.EventHandler(this.timer_Tick);//定时器触发时执行timer_Tick函数
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(82, 122);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100