How to change the background image of button on runtime?

前端 未结 3 1418
逝去的感伤
逝去的感伤 2021-01-19 21:12

I m stuck with a problem. I want to change the background image of button on runtime. I got the solution for changing the color but i want to change the image.

The c

3条回答
  •  失恋的感觉
    2021-01-19 22:13

    private void button_Click(object sender, EventArgs e)
            {
               button.Image=System.Drawing.Image.FromFile("image.png");
            }
    

    try this..

提交回复
热议问题