[求助]这个程序该怎么改?
本人初学,弄个程序却运行不了,希望高手看看是什么地方出错了?using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
class StarGradienBrush:PrintableForm
{
public new static void Main()
{
Application.Run(new StarGradienBrush());
}
public StarGradienBrush()
{
Text="Star Gradien Brush";
}
protected override void DoPage(Graphics grfx,Color clr,int cx,int cy)
{
Point [] apt=new Point[5];
for(int i=0;i<apt.Length;i++)
{
double dAngle=(i*0.8-0.5)*Math.PI;
apt[i]=new Point(
(int)(cx*(0.50+0.48*Math.Cos(dAngle))),
(int)(cy*(0.50+0.48*Math.Sin(dAngle))));
}
PathGradientBrush pgbrush=new PathGradientBrush(apt);
pgbrush.CenterColor=Color.White;
pgbrush.SurroundColors=new Color[1] {Color.Black};
grfx.FillRectangle(pgbrush,0,0,cx,cy);
}
}
运行的结果应该是个五角星形状的多边形.

<iframe name="alimamaifrm" frameborder="0" marginheight="0" marginwidth="0" border="0" scrolling="no" width="300" height="170" src="/go/app/tbk_app/chongzhi_300_170.php?pid=mm_28854300_2441872_11377541&page=chongzhi_300_170.php&size_w=300&size_h=170&stru_phone=1&stru_game=1&stru_travel=1" ></iframe>