可怎样才能让我画的图形显示出来了??试了几次,在WINDOWS应用程序中还是不能显示出来,请高手指点!全部代码如下:
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace pcture_test1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Graphics g = this.CreateGraphics();
Pen pen = new Pen(Color.Red,5);
g.DrawLine(pen, new Point(0, 0), new Point(100, 100));
}
}
}