473,388 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Can System.Windows.Forms be used from a DLL???

I am getting compile time errors from the following line:
using namespace System::Windows::Forms;

Error 1 error C3083: 'Windows': the symbol to the left of a '::'
must be a type
Error 2 error C2039: 'Forms' : is not a member of 'System'
Error 3 error C2871: 'Forms' : a namespace with this name does not
exist
Oct 9 '08 #1
5 2422
You need to add a reference to the project for System.Windows.Forms.

Schneider

"PeteOlcott" <Pe********@gmail.comwrote in message
news:03**********************************@w1g2000p rk.googlegroups.com...
>I am getting compile time errors from the following line:
using namespace System::Windows::Forms;

Error 1 error C3083: 'Windows': the symbol to the left of a '::'
must be a type
Error 2 error C2039: 'Forms' : is not a member of 'System'
Error 3 error C2871: 'Forms' : a namespace with this name does not
exist

Oct 9 '08 #2
Add System.Windows.Forms.DLL to your references list.

--
Pete
====
http://mrpmorris.blogspot.com
http://www.capableobjects.com
Oct 9 '08 #3
"PeteOlcott" <Pe********@gmail.comwrote in message
news:03**********************************@w1g2000p rk.googlegroups.com...
>I am getting compile time errors from the following line:
using namespace System::Windows::Forms;

Error 1 error C3083: 'Windows': the symbol to the left of a '::'
must be a type
Error 2 error C2039: 'Forms' : is not a member of 'System'
Error 3 error C2871: 'Forms' : a namespace with this name does not
exist
Besides adding the reference, as others have said, be careful with your
syntax, since you are using double colons where you need single dots:

using System.Windows.Forms;

Oct 9 '08 #4
Isn't that C++, not C# syntax?

"PeteOlcott" wrote:
I am getting compile time errors from the following line:
using namespace System::Windows::Forms;

Error 1 error C3083: 'Windows': the symbol to the left of a '::'
must be a type
Error 2 error C2039: 'Forms' : is not a member of 'System'
Error 3 error C2871: 'Forms' : a namespace with this name does not
exist
Oct 9 '08 #5
On Oct 9, 8:11*am, PeteOlcott <PeteOlc...@gmail.comwrote:
I am getting compile time errors from the following line:
using namespace System::Windows::Forms;

Error *1 *error C3083: 'Windows': the symbol to the left of a '::'
must be a type
Error *2 *error C2039: 'Forms' : is not a member of 'System'
Error *3 *error C2871: 'Forms' : a namespace with this name does not
exist
If its a C#,

it is "." not "::"

add using sytem.Windows.Forms instead of system::Windows::Forms

-Cnu
Oct 9 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in...
0
by: Juan Galdeano | last post by:
Hi, I'm working on an ONIX project and when I try to validate or read XML files C# gives me this exception: System.IndexOutOfRangeException at System.Xml.XmlScanner.ScanDtdContent() at...
2
by: Tyler Foreman | last post by:
Hello, I had an earlier post regarding a strange exception I (thought) I was getting in my windows form. I have since been able to trace the problem to a picturebox control on my form. I can...
1
by: henrycortezwu | last post by:
Hi All, I'm trying to connect to a virtual port (COM19, OUTGOING, "Bluetooth Serial Port") using VS2005 System.IO.Ports. When I ran the ff code below here's what happens. 1) VS2005 Compiles w/o...
5
by: Tony Gravagno | last post by:
I have a class that instantiates two Timer objects that fire at different intervals. My class can be instantiated within a Windows Form or from a Windows Service. Actions performed by one of the...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
by: Mike | last post by:
Hi, I have a collection object bound to a data grid, after I remove an item from the collection, the minute I click on the datagrid I get an error saying the specified argument was out of the...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
22
by: schneider | last post by:
I need to hook the system mouse down event. I'm trying to replicate how a context menu hides when the mouse clicks outside of the control. Thanks, Schneider
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.