调用程序中的资源中的图片文件


调用代码:
head为head.png的文件名
private void button1_Click(object sender, EventArgs e) { Image img1 = global::WindowsFormsApplication4.Properties.Resources.head; button1.Image = img1; }


调用代码:
head为head.png的文件名
private void button1_Click(object sender, EventArgs e) { Image img1 = global::WindowsFormsApplication4.Properties.Resources.head; button1.Image = img1; }