no overload for matches delegate 'system.eventhandler'

后端 未结 4 1264
天涯浪人
天涯浪人 2020-12-01 20:38

As I\'m pretty new to C#, I struggle with the following piece of code. When I click to button \'knop\', the method \'klik\' has to be executed. The method has to draw the Bi

4条回答
  •  被撕碎了的回忆
    2020-12-01 21:06

    Change the klik method as follows:

    public void klik(object pea, EventArgs e)
    {
        Bitmap c = this.DrawMandel();
        Button btn = pea as Button;
        Graphics gr = btn.CreateGraphics();
        gr.DrawImage(b, 150, 200);
    }
    

提交回复
热议问题