閱讀643 返回首頁    go 阿裏雲 go 技術社區[雲棲]


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);
  }

最後更新:2017-04-02 17:51:21

  上一篇:go Linux Red Hat as 5.4 配置 yum
  下一篇:go error LNK2005: * already defined in *.obj