
C#触发paint事件
现在我想:单击button1后触发paint事件,该怎么做?拜托各位高手不要只说两句理论,最好能给出代码实例,多谢啦!(我是个初学的小白)代码节选如下:privatevo...
现在我想:单击button1后触发paint事件,该怎么做?拜托各位高手不要只说两句理论,最好能给出代码实例,多谢啦!(我是个初学的小白)
代码节选如下:
private void button1_Click(object sender, EventArgs e)
{
play = true;
this.timer1.Enabled = true;
this.timer1.Interval = 500;
pictureBox1.Refresh();
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
后面是绘图 展开
代码节选如下:
private void button1_Click(object sender, EventArgs e)
{
play = true;
this.timer1.Enabled = true;
this.timer1.Interval = 500;
pictureBox1.Refresh();
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
后面是绘图 展开
展开全部
你可能没有把paint事件和form里的paint属性关联起来。
在form_Load里加一句
pictureBox1.Paint+=pictureBox1_paint;
试试应该就好了
在form_Load里加一句
pictureBox1.Paint+=pictureBox1_paint;
试试应该就好了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询