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

Msgbox vs Messagebox

Hi,
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.

RC
Nov 21 '05 #1
6 11134
On 2004-12-12, Richard <kg@nospam.com> wrote:
Hi,
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.

RC


MsgBox is just a wrapper for MessageBox. I prefere to cut out the
middle man and just use MessageBox. I think the whole thing boils down
to use what you like best :)

--
Tom Shelton [MVP]
Nov 21 '05 #2
C# programmers won't make fun of you. In general it's probably a good
choice to avoid the compatibility library. On a more serious note though, I
belive they have different return values, but I'm not positive on that one.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Richard" <kg@nospam.com> wrote in message
news:#j**************@TK2MSFTNGP11.phx.gbl...
Hi,
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.

RC

Nov 21 '05 #3
"W.G. Ryan eMVP" <Wi*********@NoSpam.gmail.com> schrieb:
C# programmers won't make fun of you. In general it's probably a good
choice to avoid the compatibility library.


'MsgBox' is part of "Microsoft.VisualBasic.dll", which is not the
compatibility library.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
"Richard" <kg@nospam.com> schrieb:
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.


I prefer 'MsgBox' because it's faster to type and IMO better readable.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5
Richard,

I prefer messagebox above msgbox with msgbox I get always such a strange
feeling in my throat when I type it.

What a crazy answers you get on your question (except from Tom)

Just take what *you* prefer as Tom says.

Cor

"Richard" <kg@nospam.com>
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.

RC

Nov 21 '05 #6
On 2004-12-12, Richard <kg@nospam.com> wrote:
Hi,
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.


I wouldn't say either is globally preferred, it's more personal
preference and style. You'll find that this is true of most of the
functionality that's duplicated in both the System.* and
Microsoft.VisualBasic.* namespaces. Over time, most vb programmers fall
into a mix of the two that is comfortable for them, depending on
personal style and professional situation.

Personally, I prefer MessageBox.Show for a number of reasons:

It allows you to specify owner window, rather than have vb guess at it.

It's standard framework rather than VB-specific, so users of other
languages recognize it.

It's type-safe.

It's not always there by default. This gives you just a little bit added
protection against doing UI things in non-UI classes.
Nov 21 '05 #7

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

Similar topics

2
by: Larry Pits | last post by:
Hi All, I just want to display a message using msgbox() and I keep on getting this error message. It is invalid to show a modal dialog or form when the application is not running in...
3
by: Tee | last post by:
Hi, I have a boolean variable, I need to see it's true or false from a MessageBox.Show, but when I try to compile, I keep on getting error, "cannot convert from 'bool' to 'string'". This is...
14
by: Ant | last post by:
Hello, I'm a newbie to C#. Does it have a Msgbox function like VB6 i.e. MsgBox "Hello World". What is the equivelant function? Does it have one? Thanks for your time on this simple question
7
by: MadCrazyNewbie | last post by:
Hey Group, Sorry to be a pain again but i have the following code: If MessageBox.Show("Are Your Sure You Want To Send This Email?", "Are Your Sure You Want To Send This Email?",...
5
by: roberto | last post by:
Hi at all i have a web application (in vb.net), and i want to use a message box control like System.Windows.Forms.MessageBox control, to show simple messages . I used this but vb.net said me an...
4
by: | last post by:
I have about 20 MsgBox occurance in by program, which I use to inform the user of the progress of the program, or ask confirmation of an action, or simply to act separators to various parts of the...
4
by: Prabhudhas Peter | last post by:
Can Any one explain me what is the Difference between MsgBox and MessageBox.Show... In VB6 i used MsgBox, So Can I Say "MessageBox.Show" is the new version of MsgBoz which belongs to C# or VB --...
9
by: Ivan Jericevich | last post by:
In my code below at the line 'response' a blip sound is heard and the program exits the sub -- No MsgBox is displayed. What am I doing wrong? If nonNumberEntered = True Then msg = "Enter...
3
by: Adam Sandler | last post by:
Hello, I'm converting this code from VB: Try With serialPort ' snip End With Catch ex As Exception MsgBox(ex.ToString)
5
by: win | last post by:
I'm using ASP.Net 2.0 MsgBox("Are you sure to delete?", MsgBoxStyle.Question + MsgBoxStyle.OkCancel, Page.Title.ToString) The message box sometimes does not pop up on the top of the screen....
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: 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
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
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
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
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.