PC Review


Reply
Thread Tools Rate Thread

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

 
 
PeteOlcott
Guest
Posts: n/a
 
      9th Oct 2008
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
 
Reply With Quote
 
 
 
 
eschneider
Guest
Posts: n/a
 
      9th Oct 2008
You need to add a reference to the project for System.Windows.Forms.

Schneider

"PeteOlcott" <(E-Mail Removed)> wrote in message
news:039601f1-4294-4c6b-8cdf-(E-Mail Removed)...
>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



 
Reply With Quote
 
Peter Morris
Guest
Posts: n/a
 
      9th Oct 2008
Add System.Windows.Forms.DLL to your references list.



--
Pete
====
http://mrpmorris.blogspot.com
http://www.capableobjects.com
 
Reply With Quote
 
Alberto Poblacion
Guest
Posts: n/a
 
      9th Oct 2008
"PeteOlcott" <(E-Mail Removed)> wrote in message
news:039601f1-4294-4c6b-8cdf-(E-Mail Removed)...
>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;

 
Reply With Quote
 
Family Tree Mike
Guest
Posts: n/a
 
      9th Oct 2008
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
>

 
Reply With Quote
 
Duggi
Guest
Posts: n/a
 
      9th Oct 2008
On Oct 9, 8:11*am, PeteOlcott <PeteOlc...@gmail.com> 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


If its a C#,

it is "." not "::"

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

-Cnu
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Windows.Forms.Form and System.Windows.Forms.RichTextBox Piotr Microsoft Dot NET 4 23rd Mar 2006 09:41 AM
An unhandled exception of type 'System.InvalidCastException' occurred in system.windows.forms.dll Ben Microsoft VB .NET 1 5th Aug 2005 07:36 PM
How do I know System.Windows.Forms.TextBox in System.Windows.Forms lose Active? Frank Lee Microsoft Dot NET Framework 3 6th May 2005 12:20 PM
Designing Forms not inheriting directly from System.Windows.Forms.Form Patrick Long Microsoft Dot NET Compact Framework 2 24th Oct 2003 04:42 AM
Answer to An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll David Mac McRae Microsoft Dot NET Framework Forms 0 14th Aug 2003 11:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:05 AM.