bt = new Bitmap(panel1.Width, panel1.Height);
this.panel1.BackgroundImage = bt;
Graphics g = Graphics.FromImage(bt);
this.panel1.BackgroundImage = bt;
Graphics g = Graphics.FromImage(bt);
g.Clear(Color.White);
//在bt上画图
本文详细介绍了如何使用C#在Panel控件上绘制图形,包括创建位图、设置背景图片、使用Graphics对象进行绘图的基本步骤。适用于学习Windows应用程序开发的开发者。
g.Clear(Color.White);
//在bt上画图
7422

被折叠的 条评论
为什么被折叠?