•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 426,469 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,221 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 5159 | Replies: 11
![]() |
•
•
Join Date: Jul 2007
Posts: 17
Reputation:
Rep Power: 2
Solved Threads: 0
Hi 
I stll not working :/
I open a new Class Library project, write the code you wrote, i run
the project, and its not working.
Th error:
What is the problem ?
Thanks.

I stll not working :/
I open a new Class Library project, write the code you wrote, i run
the project, and its not working.
Th error:
•
•
•
•
The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?) C:\Documents and Settings\adirim\My Documents\Visual Studio 2005\Projects\project\ClassLibrary1\Class1.cs 4 14 ClassLibrary1
What is the problem ?
Thanks.
•
•
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation:
Rep Power: 7
Solved Threads: 59
You are missing a reference to the System.Windows.Forms.dll
In order to use the System.Windows.Forms namespace and classes in your code your project must reference the dll library in which those classes are compiled. When you create a windows application project this reference is included automatically by Visual Studio. When creating a class library you have to be explicit.
In the solution explorer right click the references folder below your class library project, select add reference. In the NET tab scroll down to System.Windows.Forms.dll and select it and click ok, now the using statement will be valid and the project should compile.
In order to use the System.Windows.Forms namespace and classes in your code your project must reference the dll library in which those classes are compiled. When you create a windows application project this reference is included automatically by Visual Studio. When creating a class library you have to be explicit.
In the solution explorer right click the references folder below your class library project, select add reference. In the NET tab scroll down to System.Windows.Forms.dll and select it and click ok, now the using statement will be valid and the project should compile.
Last edited by hollystyles : Aug 15th, 2007 at 5:01 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- global or function? (Python)
- Multithreading error (C++)
Other Threads in the C# Forum
- Previous Thread: fixing the column size of a datagrid
- Next Thread: some doubts



Linear Mode