不断获取错误,不应该是一个... [英] Keep Getting error that shouldnt be one...

查看:81
本文介绍了不断获取错误,不应该是一个...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码...

Here is my code...

Imports System.Windows.Forms.Design
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Drawing.Design
Imports System.Drawing.Drawing2D

Public Class WhatEver
    Inherits ControlDesigner


End Class



该行(继承ControlDesigner)抛出错误...错误说
未定义Type ControlDesigner类型"

我在VS 2005,VS 2008和VS 2010中遇到相同的错误.

我检查了对象浏览器,它显示在



The line (Inherits ControlDesigner) is throwing an error...Error Says
"Type ControlDesigner is not defined"

I get the same error in VS 2005, VS 2008 and VS 2010.

I checked the Object Browser and it shows up under

System.Windows.Forms.Design



我做错了什么?
这是一个类文件.



What am I doing wrong???
This is a class file.

推荐答案

您需要添加对System.Design.dll的引用.如果未在添加引用"对话框中显示,则您的项目可能被设置为.Net 4 Client Profile.要使用完整框架中的DLL,请转到项目的属性",编译"选项卡,高级编译选项"按钮,并为目标框架(所有配置)"将".NET Framework 4客户端配置文件"更改为".NET Framework". 4.
You need to add a reference to System.Design.dll. If it does not show in the Add Reference dialog, your project may be set to the .Net 4 Client Profile. To use DLL''s from the full framework, go to your project Properties, Compile tab, Advanced Compile Options button, and for "Target framework (all configurations)", change ".NET Framework 4 Client Profile" to ".NET Framework 4".


这篇关于不断获取错误,不应该是一个...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆