John Smith John Smith - 2 months ago 6
C# Question

c#, 'Forms' does not exist in the namespace system.windows

I have just started working on c#, and was fiddling with some code sample that I got from some forum.

This code is using a namespace

using system.windows.forms
for which I am getting an error:
Forms does not exist in the namespace system.windows
. Also I am getting some error related to undefined functions for
senddown
&
sendup
which I believe to be in the
Forms
name space.

I am using visual studio 10 (with .net frame work 4.0). Any idea how to fix this error?

Thanks.

Answer

Expand the project in Solution Tree, right click on References, Add Reference, Select System.Windows.Forms on Framework tab.

You need to add reference to some non-default assemblies sometimes.