错误:CS0246,麻烦帮我看看

[复制链接]
查看11 | 回复1 | 2011-2-25 12:22:11 | 显示全部楼层 |阅读模式
System.Drawing.Font printFont = new Font("宋体",11);
System.Drawing.SolidBrush brush = new SolidBrush(System.Drawing.Color.Black);
//输入厘米转换成像素
private point Getpoint(decimal x , decimal y)
{
return new Point((int)(x * 0.3937m * 100) , (int)(y * 0.3937m * 100));
}
private RectangleF GetRect(Point point)
{
return new RectangleF(point.X , point.Y , (float)(15 * 0.3937 * 100) , printFont.Height 1);
}
private void DrawString(System.Drawing.Printing.PrintPageEventArgs e , string s ,Point point)
{
e.Graphics.DrawString(s ,printFont , brush , GetRect(point));
}
wo.cs(36,9): error CS0246: 找不到类型或命名空间名称“Point”(是否缺少 using

指令或程序集引用?)
wo.cs(41,28): error CS0246: 找不到类型或命名空间名称“Point”(是否缺少 using

指令或程序集引用?)
wo.cs(41,9): error CS0246: 找不到类型或命名空间名称“RectangleF”(是否缺少 using

指令或程序集引用?)
wo.cs(46,82): error CS0246: 找不到类型或命名空间名称“Point”(是否缺少 using

指令或程序集引用?)

回复

使用道具 举报

千问 | 2011-2-25 12:22:11 | 显示全部楼层
请添加using System.Drawing如果还不行请确定你有添加System.Drawing程序集的引用,像这样:
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行