Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Visual Studio 2010 C# 中控制光标。我有它的代码 ( Cursor.Position = new Point(x, y);) 但我需要包含System.Windows.Forms它才能使用它,否则它只会给我一个错误。问题是,它在windows下找不到Forms!我已经包含System.Windows.Forms.dll在我的程序集中,但仍然没有运气。任何帮助表示赞赏。
Cursor.Position = new Point(x, y);
System.Windows.Forms
System.Windows.Forms.dll
您应该将项目的目标框架更改为 .NET 4 Framework 客户端配置文件。
/蒂比
在 VS2010 中转到项目 -> 添加引用 -> .net 选项卡 -> 查找 system.windows.forms -> ok,然后添加 using 指令