Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the System.Windows.Forms.Integration namespace?

I can't seem to find it, trying to keyboard input in a wpf form spawned from a winforms form. Found this: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/442782b1-00a1-4e2e-9cc6-ae99b6699126/ But when I try to use it, VS2008 complains about not being able to find the System.Windows.Forms.Integration namespace. I couldn't find a reference in the add references.

The only thing I can think of it maybe because it was a VS2005 project ported to VS2008?

like image 498
Davy8 Avatar asked Mar 13 '09 22:03

Davy8


3 Answers

You'll need to add a reference to WindowsFormsIntegration. If you do a Add Reference in Visual Studio, it will be near the last DLL available in the .Net tab

On my machine it's located at

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

like image 144
JaredPar Avatar answered Nov 17 '22 11:11

JaredPar


Visual Studio filters the available namespaces according to the type of project you chose. If you need a namespace that is not listed, click the [Add...] button on the references tab of your project's properties. This will pop-up the Reference Manager window. Choose "Framework" from the list of Assemblies in the left-hand panel. This will display all the Microsoft provided namespaces. You will find WindowsFormsIntegration there.

like image 40
timMulherin Avatar answered Nov 17 '22 11:11

timMulherin


Just came across the same problem.

While adding a reference to WindowsFormsIntegration.dll didn't work as this has no WF controls in it, I did find that adding a reference to System.Windows.Forms worked perfectly fine.

like image 1
Ortund Avatar answered Nov 17 '22 09:11

Ortund