MessageBox.Show is still around. Most
VB .NET developers use it instead of MsgBox because it feels "more object-oriented" although you can use either.
MsgBox is a Visual Basic "Classic" function so it's provided for backwards compatibility in the Microsoft.VisualBasic namespace.
But MessageBox.Show is the "true" .NET way to do things. In particular, a C# programmer probably wouldn't have the Microsoft.VisualBasic namespace imported so he wouldn't be able to use MsgBox without some additional effort.
The MessageBox class is in the System.Windows.Forms namespace so you won't see it if you make a console application, class library, or other applicaion that normally doesn't include this library. You will see it in a Windows Forms application or a control library.
If you don't see it, open Project Explorer and double-click My Project. On the References tab, click the Add button, and select the System.Windows.Forms library. Then don't forget to add "Imports System.Windows.Forms" to your code.
I hope that helps.
Rod
[email protected]
Author of "Visual Basic 2005 Programmer's Reference"
http://www.vb-helper.com/vb_prog_ref.htm
Sign up for the free
VB Helper Newsletters at
http://www.vb-helper.com/newsletter.html