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?
Expand the project in Solution Tree, Right-Click on
References,Add Reference, SelectSystem.Windows.FormsonFrameworktab.You need to add reference to some non-default assemblies sometimes.
From comments: for people looking for VS 2019+: Now adding project references is Right-Click on
DependenciesinSolution Explorer.For people looking for VS Code: How do I add assembly references in Visual Studio Code