原因: 新建项目为类库时,项目不会自动引用System.Windows.Forms,当我们使用命名空间System.Windows.Forms时,就会报这个错误 解决方法: 右键引用——添加引用——框架——搜索System.Windows.Forms添加即可...