在PictureBox 上绘制图像、文字是在背景图像上绘制,使用:
Graphics g1=new Graphics.FromImage(pictureBox1.BackgroundImage);
而在PictureBox 上放置button则使用
Button btn =new Button(); btn.xxx=xxx; btn.Location=pointx; pictureBoxX.Contrls.Add(btn);
两者有所区别,绘制图像、文字是在底层图像上,而Button则浮在PictureBox表面。