473,399 Members | 4,192 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,399 software developers and data experts.

Using a messagebox

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):

[C# Error] WinForm.cs(89): The name MsgBox doesn't exist in the class or
namespace ShowName.WinForm

How do I correct the code? After clicking on the button button1, I want to
see a message box with the text "Blablabla".
Why is the error message in Dutch (I have Windows XP Home in Dutch)?

Hans Kamp.
Nov 15 '05 #1
3 8349
Hans,
private void button1_Click(object sender, System.EventArgs e)
{
MsgBox("Blablabla");
}

causes the message (translated from Dutch):

[C# Error] WinForm.cs(89): The name MsgBox doesn't exist in the class or
namespace ShowName.WinForm


You need to use the Show() method of the MessageBox class rather than
calling a MsgBox function. For example:

MessageBox.Show("Here is my message", "This is the title");

Regards,
Kevin McNeish
C# MVP
Chief Software Architect, Mere Mortals .NET Framework
www.oakleafsd.com
Nov 15 '05 #2

"Kevin McNeish [C# MVP]" <ke****@oakleafsd.com> schreef in bericht
news:ev**************@tk2msftngp13.phx.gbl...
Hans,
private void button1_Click(object sender, System.EventArgs e)
{
MsgBox("Blablabla");
}

causes the message (translated from Dutch):

[C# Error] WinForm.cs(89): The name MsgBox doesn't exist in the class or
namespace ShowName.WinForm


You need to use the Show() method of the MessageBox class rather than
calling a MsgBox function. For example:

MessageBox.Show("Here is my message", "This is the title");


Aha! Thanks!

Hans Kamp.
Nov 15 '05 #3
System.Window.Forms.MessageBox.Show("BLAH");
[or]
If you are using the Form Code Page just: MessageBox.Show("BLAH");
"Hans Kamp" <in**@hanskamp.com> wrote in message
news:bi**********@news3.tilbu1.nb.home.nl...
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):

[C# Error] WinForm.cs(89): The name MsgBox doesn't exist in the class or
namespace ShowName.WinForm

How do I correct the code? After clicking on the button button1, I want to
see a message box with the text "Blablabla".
Why is the error message in Dutch (I have Windows XP Home in Dutch)?

Hans Kamp.

Nov 15 '05 #4

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

Similar topics

0
by: grutta | last post by:
I am writing a windows service that will recieve notification when a USB Device is insterted into the machine. I have used the RegisterDeviceNotification and the RegisterServiceCtrlHandlerEx with...
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...
12
by: babak | last post by:
Hi everyone I want to format a string (using sprintf) and put it in a messagebox but however I try to do it, it doesn't seem to work. Here is an example sample of what i try to do: char msg;...
2
by: Matthew Louden | last post by:
how to show the message box in ASP.NET? I try MessageBox.Show, but not work.
3
by: jaYPee | last post by:
is there a way to know if the form is edited or not after calling addnew? Me.BindingContext(DsStudentCourse1, "Students").AddNew() because i got an error after closing the form. because in my...
9
by: Peter | last post by:
Hello£¬everyone, My program will collect a testing machine's data ,save the data and deal with the data everyday. I want to use vb.net to create database, add and delete tables or modify the...
3
by: Tracey | last post by:
Is there a way to include the quote mark/character when using the MessageBox.Show? In other words is there an alternative/secondary delimiter for strings in VB2005? <"denotes the desired...
0
by: srinivas srinivas | last post by:
Hi, I am developing simple peer-peer RTC application for monitoring the SDP packets and i need to set the TLS security for the transport. But iam struggling to achieving this. Iam using IP...
5
by: raylopez99 | last post by:
I have a form, Form6, that has a bunch of buttons overlaid on it. I want to be able to click on any arbitrary area of the form, and if that area of the form is overlaid by a button, I want to...
14
by: raylopez99 | last post by:
KeyDown won't work KeyPress fails KeyDown not seen inspired by a poster here:http://tinyurl.com/62d97l I found some interesting stuff, which I reproduce below for newbies like me. The main...
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
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
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...
0
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
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,...

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.