在窗體中放入圖片素材
public partial class Form1 : Form
{
? ? ? public Form1()
? ? ? {
? ? ? ? ? ? InitializeComponent();
? ? ? ? ? ? this.StartPosition = FormStartPosition.Manual;
? ? ? ? ? ? this.Location = new Point(120, 95);?
? ? ? ?}
? ? ? ?private void Form1_Paint(object sender, PaintEventArgs e)
? ? ? ?{
? ? ? ? ? ? Graphics g = this.CreateGraphics();//先扯一個畫布
? ? ? ? ? ? Image image=Properties.Resources.Boss;
? ? ? ? ? ? g.DrawImage(image, 200, 200);
? ? ??}
}
標簽: