Solved

MessageBox in VB 2005

Posted on 2007-04-04
4
797 Views
Last Modified: 2008-02-01
In VB6, to show a message box, I used to use this code:

MsgBox ("Hello World!")

I see in VB 2005 there is another message box which can be called like this:

MessageBox.Show ("Hellow World")

Which one should I be using in VB 2005?
0
Comment
Question by:SETP
4 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 200 total points
ID: 18849415
The 2nd one is the .Net version
There's still support for the first, but if you're trying to move towards .Net, use Messagebox...
0
 
LVL 18

Assisted Solution

by:Sethi
Sethi earned 150 total points
ID: 18849544
I agree. There are many other backward compatible codes existing in VB 2005 just to ease the migration pain VB6 developers face while migrating their code from Vb6 to VB 2005. You should try to stick to .Net version of same functionality as that will be little faster.
0
 
LVL 85

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 150 total points
ID: 18851720
Just FYI...I have seen posts where the use of the older MsgBox caused unforeseen side effects such as focus issues and/or not appearing "in front".

0
 

Author Comment

by:SETP
ID: 18857660
Thanks guys
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question