首先在项目属性--》资源  --》添加资源--》添加现有文件即可

  private Image bgImage;
        public Form1()
        {
            InitializeComponent();
            bgImage = new Bitmap(Properties.Resources.shq);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            e.Graphics.DrawImage(bgImage, this.ClientRectangle, new Rectangle(0, 0, this.bgImage.Width, this.bgImage.Height), GraphicsUnit.Pixel);
        }

 

label1.BackColor = Color.Transparent;   把lable透明化

相关文章:

  • 2021-10-07
  • 2021-12-22
  • 2022-12-23
  • 2021-11-06
  • 2021-10-23
  • 2021-12-16
  • 2021-12-19
  • 2022-02-23
猜你喜欢
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案