C# 如何给Panel 添加背景图片

添加panel的paint事件,然后在panel上面画出图片
例子:this.panelMain.Paint += new System.Windows.Forms.PaintEventHandler(this.panelMain_Paint);

private void panelMain_Paint(object sender, PaintEventArgs e)
  {
  Graphics g = e.Graphics;
  g.DrawImage(new Bitmap(Properties.Resources.Legalize_main_bg), 0, 0);
  }
上一篇:在VC6中编写可在XP中显示XP风格界面的程序


下一篇:C# URL带中文参数的解决办法