473,406 Members | 2,620 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,406 software developers and data experts.

System.Windows.Forms namespace

Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex

Sep 19 '06 #1
7 1665
Alex

Have you referenced System.Windows.Forms dll in VS solution explorer (if
your using VS of course).

HTH

Glenn

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex

Sep 19 '06 #2
Glenn, thanks for the quick answer,

Yes, I'm writing my project using VS 2005. So currently I have in my
..cs file

using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Collections.Generic;
using System.Text;

with no problem..., but ...System.Windows is not available on some
reason...
Glenn wrote:
Alex

Have you referenced System.Windows.Forms dll in VS solution explorer (if
your using VS of course).

HTH

Glenn

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex
Sep 19 '06 #3
OK, I've figured it myself, I had to go in Project->Add Reference and
add:
System.Windows.Forms.... now everything is fine. I just don't
understand why this namespace was not included in my project
automatically...
Alex wrote:
Glenn, thanks for the quick answer,

Yes, I'm writing my project using VS 2005. So currently I have in my
.cs file

using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Collections.Generic;
using System.Text;

with no problem..., but ...System.Windows is not available on some
reason...
Glenn wrote:
Alex

Have you referenced System.Windows.Forms dll in VS solution explorer (if
your using VS of course).

HTH

Glenn

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,
>
I'm completely new to C#, so here is my question:
>
Why my C# program (COM dll which I can call from C++ application)
cannot see namespace
>
System.Windows.Forms..
>
When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );
>
Thanks,
Alex
>
Sep 19 '06 #4
Right click on References in solution explorer and click Add new reference.
Then choose System.Windows.Forms.dll from the list and you are done.
"Alex" <al******@hotmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Glenn, thanks for the quick answer,

Yes, I'm writing my project using VS 2005. So currently I have in my
.cs file

using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Collections.Generic;
using System.Text;

with no problem..., but ...System.Windows is not available on some
reason...
Glenn wrote:
>Alex

Have you referenced System.Windows.Forms dll in VS solution explorer (if
your using VS of course).

HTH

Glenn

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegr oups.com...
Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex

Sep 19 '06 #5
It depends on the project template. System.Windows.Forms.dll is referenced
only when you create a Windows Application project

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
OK, I've figured it myself, I had to go in Project->Add Reference and
add:
System.Windows.Forms.... now everything is fine. I just don't
understand why this namespace was not included in my project
automatically...
Alex wrote:
>Glenn, thanks for the quick answer,

Yes, I'm writing my project using VS 2005. So currently I have in my
.cs file

using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Collections.Generic;
using System.Text;

with no problem..., but ...System.Windows is not available on some
reason...
Glenn wrote:
Alex

Have you referenced System.Windows.Forms dll in VS solution explorer
(if
your using VS of course).

HTH

Glenn

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex

Sep 19 '06 #6
Because it's not essential for everybody, not many people want it
included unless you have an explicit need for that..

Alex wrote:
OK, I've figured it myself, I had to go in Project->Add Reference and
add:
System.Windows.Forms.... now everything is fine. I just don't
understand why this namespace was not included in my project
automatically...
Alex wrote:
>Glenn, thanks for the quick answer,

Yes, I'm writing my project using VS 2005. So currently I have in my
.cs file

using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Collections.Generic;
using System.Text;

with no problem..., but ...System.Windows is not available on some
reason...
Glenn wrote:
>>Alex

Have you referenced System.Windows.Forms dll in VS solution explorer (if
your using VS of course).

HTH

Glenn

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googleg roups.com...
Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex
Sep 19 '06 #7
Maybe the MessageBox was just an example, but just in case that's what you
intend to use:
Throwing up a MessageBox from inside an inproc COM object will rarely (never
IMHO) be a good idea.

/claes

"Alex" <al******@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,

I'm completely new to C#, so here is my question:

Why my C# program (COM dll which I can call from C++ application)
cannot see namespace

System.Windows.Forms..

When I'm typing in "using System..." after the System. the only "W"
prompt is Web, so I cannot use in my program something like
MessageBox.Show( "blah, blah, blah" );

Thanks,
Alex

Sep 19 '06 #8

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...
1
by: lwickland | last post by:
Summary: System.Net.ScatterGatherBuffers.MemoryChuck allocates inordinately large bytes when sending large post data. The following application consumes inordinate quantities of memory. My code...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
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: Pantokrator | last post by:
Hi! Could you please tell me what am I doing wrong here.... I've got a simple form called Form1 and all I want to do is to pass the pointer to my other class called CCueMakerEngine. Here's what...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.