Solved

MessageBox in VB 2005

Posted on 2007-04-04
4
766 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now