System.Windows.Forms.Integration命名空间在哪里?

时间:2009-03-13 22:05:41

标签: wpf winforms interop

我似乎无法找到它,尝试以winform形式衍生的wpf格式输入键盘输入。发现这个:http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/442782b1-00a1-4e2e-9cc6-ae99b6699126/但是当我尝试使用它时,VS2008抱怨无法找到System.Windows.Forms.Integration命名空间。我在添加引用中找不到引用。

我能想到的唯一一件事可能是因为它是一个移植到VS2008的VS2005项目?

4 个答案:

答案 0 :(得分:60)

您需要添加对WindowsFormsIntegration的引用。如果在Visual Studio中执行“添加引用”,它将接近.Net选项卡中可用的最后一个DLL

在我的机器上,它位于

  

%ProgramFiles%\ Reference Assemblies \ Microsoft \ Framework \ v3.0 \ WindowsFormsIntegration.dll

答案 1 :(得分:1)

刚遇到同样的问题。

虽然添加对WindowsFormsIntegration.dll的引用不起作用,因为其中没有WF控件,但我确实发现添加对System.Windows.Forms的引用非常正常。

答案 2 :(得分:0)

Visual Studio根据您选择的项目类型过滤可用的命名空间。如果需要未列出的命名空间,请单击项目属性的“引用”选项卡上的[添加...]按钮。这将弹出Reference Manager窗口。选择"框架"从左侧面板中的程序集列表中。这将显示Microsoft提供的所有命名空间。你会在那里找到WindowsFormsIntegration。

答案 3 :(得分:0)

使用更新的版本:

%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\WindowsFormsIntegration.dll
相关问题