473,748 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1681
Alex

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

HTH

Glenn

"Alex" <al******@hotma il.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.Collecti ons.Generic;
using System.Text;

with no problem..., but ...System.Windo ws 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******@hotma il.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.Collecti ons.Generic;
using System.Text;

with no problem..., but ...System.Windo ws 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******@hotma il.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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******@hotma il.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.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.Collecti ons.Generic;
using System.Text;

with no problem..., but ...System.Windo ws 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******@hotma il.comwrote in message
news:11******* *************** @i3g2000cwc.goo glegroups.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******@hotma il.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.Collecti ons.Generic;
using System.Text;

with no problem..., but ...System.Windo ws 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******@hotma il.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.Collecti ons.Generic;
using System.Text;

with no problem..., but ...System.Windo ws 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******@hotma il.comwrote in message
news:11****** *************** *@i3g2000cwc.go oglegroups.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.Windo ws.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.S how( "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******@hotma il.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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
9141
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 system.windows.forms.dll
0
1783
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 System.Xml.Schema.DtdParser.ScanDtdContent() at System.Xml.Schema.DtdParser.ParseDtdContent() at System.Xml.Schema.DtdParser.ParseDocTypeDecl()
1
4010
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 does not explicitly allocate memory in a loop nor does it explicitly allocate large blocks of memory. Yet, the application’s memory footprint will grow as large as 370 MB. Rarely will it run to completion; usually, it throws an out of memory...
1
18198
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 is serialized correctly, and the server returns a response (I've captured the response and it's correct!) but when the .NET deserialize this response, it throws the exception "System.InvalidOperationException: There is an error in XML
4
11126
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 the default of True. The Elapsed event handler updates the dialog box with how long before it will close, acting as a timer itself. The dialog has a time to close property which is checked every time the Elapsed event fires. The problem I have...
3
4029
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 selects? thanks...
1
7847
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 am note sure what to do because all propertiers work, except the System.Data.DataColumn.. I didn't write any code by hand and used the visual studio to set the properties..
0
1342
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 I've got: In Form1.h: ---------------------------- #pragma once
2
4501
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 boxes (please see associated source code below): 1) Win32 API with context ("btnWin32WithContext_Click") 2) .NET Framework with context ("btnFrameworkWithContext_Click") 3) Win32 API withOUT context ("btnWin32WithOUTContext_Click")
0
9561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8252
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.