Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用System.Windows.Forms_C#_Windows_Forms_Mouse_System - Fatal编程技术网

C# 使用System.Windows.Forms

C# 使用System.Windows.Forms,c#,windows,forms,mouse,system,C#,Windows,Forms,Mouse,System,我正在Visual Studio 2010 C#中尝试控制光标。我有它的代码(Cursor.Position=new Point(x,y);),但我需要包括System.Windows.Forms来使用它,否则它只会给我一个错误。问题是,它在windows下找不到窗体!我已经在我的程序集中包含了System.Windows.Forms.dll,但仍然没有成功。非常感谢您的帮助。您应该将项目的目标框架更改为.NET 4 framework客户端配置文件 /Tibi在VS2010中,转到projec

我正在Visual Studio 2010 C#中尝试控制光标。我有它的代码(
Cursor.Position=new Point(x,y);
),但我需要包括
System.Windows.Forms
来使用它,否则它只会给我一个错误。问题是,它在windows下找不到窗体!我已经在我的程序集中包含了
System.Windows.Forms.dll
,但仍然没有成功。非常感谢您的帮助。

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


/Tibi

在VS2010中,转到project->add reference->.net选项卡->查找system.windows.forms->ok,然后添加using指令

我做到了!“我已在程序集中包含System.Windows.Forms.dll”