微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

c# – 对System.Windows.Forms的引用

我正在使用C#在Excel中命令,但是当我输入时
using System.Windows.Forms

Visual Studio无法识别它
当我添加引用时,我有错误消息

A reference to ‘System_Windows_Forms’ Could not be added.
The ActiveX type library ‘…’ was exported from a .NET assembly and cannot be added as a reference.
Add a reference to the .NET assembly instead

你有什么解决办法?

解决方法

您是否尝试从COM-tab添加它?在.NET选项卡中找到System.Windows.Forms.dll! (按名称对dll-s进行排序可以更容易找到正确的.)

原文地址:https://www.jb51.cc/csharp/98820.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐