473,421 Members | 1,532 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,421 software developers and data experts.

MessageBox doesn't exist in .NET 1.1?

I have to use .NET 1.1 and Visual Studio 2003.

I need to display messagebox. So I have:

MessageBox.Show(
string.Format("Cash is {0} for
{1}, list: {2}. It is lower than the allowed lower bound {3}!",
cashR.CashForToday,
cashR.Sector, s.List, cashR.LowerBound), "Total Cash Watch");

However, this gives me a compiling error about missing an assembly
namespace.

So I try to add the following:

using System.Windows.Forms;

However, in the intellisense, there is no "Windows" under "System". It
doesn't seem that there is such namespace, "System.Windows.Forms",
in .NET 1.1.

Any advice on how to get MessageBox to compile? Thanks!
Jun 27 '08 #1
6 1118
Hello Curious,
Any advice on how to get MessageBox to compile? Thanks!
You need to add a *reference* to System.Windows.Forms.dll

You're likely writing a console application which does not have this reference
by default.

--
Rory
Jun 27 '08 #2
Rory,

Many thanks for the advice! I'll add that reference as you suggested.
Have a great day!
Jun 27 '08 #3
One more question:

Where is "System.Windows.Forms.dll" located? I've done a search and
found multiple files with the same file name and don't know which one
to use.
Jun 27 '08 #4
FYI, I've found it in "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ "
Jun 27 '08 #5
On 16/06/2008 in message
<e0**********************************@34g2000hsf.g ooglegroups.comCurious
wrote:
>FYI, I've found it in "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ "
It may have been easier to find it through the "Add Reference" context
menu in the Solution Explorer.

--
Jeff Gaines Damerham Hampshire UK
There is absolutely no substitute for a genuine lack of preparation
Jun 27 '08 #6
Thanks! I do see it in the "Add Reference" menu on the ".NET" tab.
However, it seems that it only contains assemblies already added to
the project.
Jun 27 '08 #7

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

Similar topics

3
by: Hans Kamp | last post by:
How do I use an MsgBox in C#Builder? The following code: private void button1_Click(object sender, System.EventArgs e) { MsgBox("Blablabla"); } causes the message (translated from Dutch):
8
by: Dennis C. Drumm | last post by:
I have ordered the book .NET Framework Solutions, In Search of the Lost Win32 API by John Paul Meuller which I think will help answer some of my questions I have regarding making custom...
8
by: Saso Zagoranski | last post by:
Hi! I'm trying to make my own MessageBox... What I would like to know is, how the MessageBox class is implemented? I could have something like: new MyMessageBox().ShowDialog(); but I would...
8
by: Don | last post by:
How can I add a Messagebox to my web application? I have a datatable in my web application and I'd like to show a messagebox when the table's empty. Thanks.
20
by: Peter E. Granger | last post by:
I'm having a strange problem (or at least it seems strange to me) trying to display a MessageBox in a VC++ .NET forms application. If I put the call to MessageBox::Show in the form's .h file, it...
2
by: Nuno Magalhaes | last post by:
Why does the MessageBox.Show function in the thread below changes the program behaviour, in other words, the APListView becomes filled with values with a call to RefreshAPListView. Without the...
1
by: mensuur | last post by:
hi, i want to show a messagebox when a button is clicked with asp.net. which method do i use? messagebox.show doesnt exist. mbox does and vs tells me that it is the snippet fo messagebox.show but...
3
by: rdemyan via AccessMonster.com | last post by:
Sometimes users (including myself) accidentally click on the application close icon in the application menu bar when they meant to just click on the 'X' for the form. Of course the app closes and...
3
by: Steve | last post by:
Hi All, I'm writing an error handler and need to display a MessageBox from within a Class Library. I've added System.Windows.Forms as a reference and also to my using list. The compiler...
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
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
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...
1
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...
0
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...
0
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...

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.