日期:2014-05-18  浏览次数:20735 次

如何使用GDI+在picturebox控件上面绘画
比如,在picturebox控件上画个矩形。

------解决方案--------------------
C# code

        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.FillRectangle(Brushes.Red, 0, 0, 100, 100);

        }

------解决方案--------------------
探讨
C# code


private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.FillRectangle(Brushes.Red, 0, 0, 100, 100);

}