Solved

MessageBox in VB 2005

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

806 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