Generation

generate functionMon, 20 Mar 2023

自定义一个picturebox然后给他注册一个事件

using System.Drawing; using System.Windows.Forms; public class PictureBox : PictureBox { public PictureBox(){ this.Click += new EventHandler(this.PictureBox_Click); } private void PictureBox_Click(object sender, EventArgs e){ MessageBox.Show("Hello World"); } }

Want to kickstart your project?Use the new AI Studio to create your code