Windows namespace problem 
Author Message
 Windows namespace problem

I'm pretty new to .NET, and particularly C#.  I'm getting this error when I
try to use the System.Windows.Forms namespace:

The type or namespace name 'Windows' does not exist in the class or
namespace 'System' (are you missing an assembly reference?)

Is there something additional that I need to download or is there something
I failed to link?  I checked and System.Windows.Forms.dll is in my .NET
Framework directory but I'm assuming that this relates specificly to the CLR
and not to when I build the program.  Am I way off on this?

Any suggestions?
Thanks.

Michael D. Krauklis

http://www.*-*-*.com/



Wed, 06 Oct 2004 03:36:50 GMT  
 Windows namespace problem
Michael,

    If you are in VS.NET, then add a reference to the
System.Windows.Forms.dll in your project.  If you are using the command line
compiler, then use the following argument when compiling your code:

/reference:System.Windows.Forms.dll

    Hope this helps.


Quote:
> I'm pretty new to .NET, and particularly C#.  I'm getting this error when
I
> try to use the System.Windows.Forms namespace:

> The type or namespace name 'Windows' does not exist in the class or
> namespace 'System' (are you missing an assembly reference?)

> Is there something additional that I need to download or is there
something
> I failed to link?  I checked and System.Windows.Forms.dll is in my .NET
> Framework directory but I'm assuming that this relates specificly to the
CLR
> and not to when I build the program.  Am I way off on this?

> Any suggestions?
> Thanks.

> Michael D. Krauklis

> http://myenigmaself.gaiden.com



Wed, 06 Oct 2004 03:42:35 GMT  
 Windows namespace problem



Quote:
> Michael,

>     If you are in VS.NET, then add a reference to the
> System.Windows.Forms.dll in your project.

What exactly do you mean by adding a reference to System.Windows.Forms.dll?
I'm very new to C#.  The line of code that breaks is simply:
using System.Windows.Forms;
I've seen many other examples of code that have the same exact line in them.

Quote:
> If you are using the command line
> compiler, then use the following argument when compiling your code:

nope, not command line compiling.

Quote:

> /reference:System.Windows.Forms.dll

Thanks for the help.


Wed, 06 Oct 2004 03:52:56 GMT  
 Windows namespace problem
Michael,

    In your project view, there is a folder that says "References".  Right
click on that folder and it will have a menu with one item, "Add Reference".
Select this.  A dialog will now come up with three tabs on it.  The one that
is shown by default is for .NET assemblies.  Find the
System.Windows.Forms.dll assembly and double click on that.  Click ok to
close all of the dialogs.  Then recompile your project.

--
               - Nicholas Paldino [.NET MVP]


Quote:


wrote

> > Michael,

> >     If you are in VS.NET, then add a reference to the
> > System.Windows.Forms.dll in your project.

> What exactly do you mean by adding a reference to

System.Windows.Forms.dll?
Quote:
> I'm very new to C#.  The line of code that breaks is simply:
> using System.Windows.Forms;
> I've seen many other examples of code that have the same exact line in
them.

> > If you are using the command line
> > compiler, then use the following argument when compiling your code:

> nope, not command line compiling.

> > /reference:System.Windows.Forms.dll

> Thanks for the help.



Wed, 06 Oct 2004 03:57:55 GMT  
 Windows namespace problem
Great, that fixed my problem.  Now on to my next problem.  Is it possible to
display a System.Windows.Forms.MessageBox durring the execution of a Web
Service?  I'm thinking no, because I have the code in there that should show
a simple MessageBox and it doesn't do anything when I execute the Web
Service.  All that aside, is there a good debugging technique you can use
for Web Services? (my web service accesses a MSSQL2k server and performs a
query, then it returns the concatonation of the first column of each row
returned from the query.  It fails and nothing is displayed.)


Wed, 06 Oct 2004 04:06:22 GMT  
 Windows namespace problem
Nix that last problem.  I'm getting somewhere so the MessageBox isn't all
that important anymore.  I'm just having a problem connecting to the server
which I should be able to figure out without too much trouble.  Thanks a lot
for your help.

Sincerely,
Michael D. Krauklis

http://myenigmaself.gaiden.com



Wed, 06 Oct 2004 04:16:05 GMT  
 Windows namespace problem
Messageboxes in a Web Service aren't a good idea and may well be disabled -
generally speaking, Web Services interact through HTTP only and have no
"console" as such, no concept of the desktop.

If you want debugging information, use a text stream to create a debug log
file and send output to that, there are some cut'n'pastey examples in the
Help.

HTH


Great, that fixed my problem.  Now on to my next problem.  Is it possible to
display a System.Windows.Forms.MessageBox durring the execution of a Web
Service?  I'm thinking no, because I have the code in there that should show
a simple MessageBox and it doesn't do anything when I execute the Web
Service.  All that aside, is there a good debugging technique you can use
for Web Services? (my web service accesses a MSSQL2k server and performs a
query, then it returns the concatonation of the first column of each row
returned from the query.  It fails and nothing is displayed.)



Wed, 06 Oct 2004 10:00:36 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Windows NameSpaces

2. Namespace extension on Windows 95.

3. Namespace extension support under Windows 98 and NT 5.0

4. missing namespace System.Windows

5. how can a namespace can see another namespace ?

6. Collision of namespace with internal namespace

7. Namespace problem

8. Template function and namespace/using problem

9. Problems with namespace System::Collections::Specialized

10. browse symbols + namespaces = problem

11. XML namespace problem

12. Problems with C++ classes within a namespace

 

 
Powered by phpBB® Forum Software