日期:2014-05-20 浏览次数:21014 次
private void button1_Click(object sender, EventArgs e)
{
//int height = 400, width = 600;
//Bitmap image = new Bitmap(height, width);
Bitmap image = new Bitmap(DisplayRectangle.Width, DisplayRectangle.Height);
using (Graphics g = Graphics.FromImage(image))
{
g.Clear(Color.White);
Pen mypen = new Pen(new SolidBrush(Color.Blue), 1);
g.DrawLine(mypen, 100, 80, 100, 340);
}
this.panel1.BackgroundImage = image;
}