Solved

MessageBox in VB 2005

Posted on 2007-04-04
4
790 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET - Error - Object not set in Module 4 39
Modal Popup Extender control 1 36
VB.Net - MemoryMappedFiles - Confirm receipt 2 24
FInd Image Control Gridview 3 20
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 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