【问题标题】:Using System.Windows.Forms使用 System.Windows.Forms
【发布时间】:2012-04-04 21:09:30
【问题描述】:

我正在尝试在 Visual Studio 2010 C# 中控制光标。我有它的代码 (Cursor.Position = new Point(x, y);) 但我需要包含 System.Windows.Forms 才能使用它,否则它只会给我一个错误。问题是,它在windows下找不到Forms!我在我的程序集中包含了System.Windows.Forms.dll,但仍然没有运气。任何帮助表示赞赏。

【问题讨论】:

    标签: c# windows forms mouse system


    【解决方案1】:

    您应该将项目的目标框架更改为 .NET 4 Framework 客户端配置文件。

    /蒂比

    【讨论】:

      【解决方案2】:

      在 VS2010 中进入项目 -> 添加引用 -> .net 选项卡 -> 查找 system.windows.forms -> ok,然后添加 using 指令

      【讨论】:

      • 我做到了! “我在我的程序集中包含了 System.Windows.Forms.dll”
      猜你喜欢
      • 2012-03-27
      • 1970-01-01
      • 2010-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-27
      相关资源
      最近更新 更多