回 帖 发 新 帖 刷新版面

主题:System”中不存在“Windows”在类????

这是从微软MSDN中拷贝过来的,为什么放进我Microsoft Visual Studio .NET 2003中就会出现[color=FF00FF]D:\wwwroot\Hello\Test\LTG01.aspx.cs(55): 类型或命名空间名称“Windows”在类或命名空间“System”中不存在(是否缺少程序集引用?)[/color]
这等错误提示,求教。


代码:创建特定形状的窗体 (Visual C#)


protected override void OnPaint( System.Windows.Forms.PaintEventArgs e )
{
    System.Drawing.Drawing2D.GraphicsPath shape = new System.Drawing.Drawing2D.GraphicsPath();
    shape.AddEllipse(0, 0, this.Width, this.Height);
    this.Region = new System.Drawing.Region(shape);
}

回复列表 (共3个回复)

沙发

引用System.Windows.Forms.dll

板凳

ASP.Net里面不可以使用Window

你可以创建一个Windows应用程序

3 楼

谢谢各位了,通过引用System.Windows.Forms.dll ,已经解决了。

我来回复

您尚未登录,请登录后再回复。点此登录或注册