[問題] 新增button後 要如何寫入新增button時所發生的事件

看板C_Sharp作者 (nioyk)時間16年前 (2009/11/29 04:53), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
private void button1_Click(object sender, EventArgs e) { Button newButton = new Button(); newButton.Location = new Point(this.panel1.Left + 20 , this.panel1.Top - 20 ); panel1.Controls.Add(newButton); } 我在button1寫入 新增一個button 目前會新增button 可是不清楚要怎麼動態寫入新增button在點擊時所發生的事情 麻煩各位先進指點 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.46.199.161

11/29 09:25, , 1F
11/29 09:25, 1F

11/29 14:40, , 2F
我會用了 謝謝!!
11/29 14:40, 2F
文章代碼(AID): #1B4OtOUW (C_Sharp)