展开private void InitializeComponent(、就有下面的代码 你应该知道了吧 看看最后一行this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.Location = new System.Drawing.Point(264, 224);
this.button2.Name = "button2";
this.button2.TabIndex = 2;
this.button2.Text = "button2";
this.button2.Click += new System.EventHandler(this.button2_Click);
this.button2.Location = new System.Drawing.Point(264, 224);
this.button2.Name = "button2";
this.button2.TabIndex = 2;
this.button2.Text = "button2";
this.button2.Click += new System.EventHandler(this.button2_Click);
你说我??
这个能说明什么问题呢?我是说我在程序上点了button,这个事件怎么会让this.button2.Click知道得呢?
this.button1.Click += new System.EventHandler(this.button1_Click_2);
最后将按钮的Click与事件处理程序连接注意:宏观上是这样的 但是在实际的运行过程还是原来的WIN32机制
调用button得窗口处理过程,在窗口处理过程中常常是switch结构,判断消息具体是什么。
我想问得是在。net中,点击button,windows怎么知道把这消息传到Click中呢?(Click的
名字可是自己取得阿)
这个能说明什么问题呢?我是说我在程序上点了button,这个事件怎么会让this.button2.Click知道得呢?在程序上点了button,这个事件怎么会让this.button2.Click知道倒~ 这个你也管呀,我只知道你点了BUTTON 就会有CLICK事件this.button1.Click 发生
而用this.button1.Click += new System.EventHandler(this.button1_Click_2);
来连接用来响应CLICK的事件