Visual Basic Development Bookmark and Share   
 Home > Visual Basic IDE > MsgBox Option has disappeared
 

MsgBox Option has disappeared

Hi,
Thanks in advance for this. Basically, I've just started using Visual Basic - I'm completely new to programming altogether and thought it might be a useful skill - and I've been slowly working my way through the tutorials - from 'Learn VB' in the Start Page - and now the MsgBox function has disappeared! I have no idea why, as I'm doing the same thing (I think) as I was always doing. New Project > Windows Forms Application > Right Click on 'Form 1' in the solutions box > Source Code. Anyhow; when I type MsgBox there is neither a dropdown box with that name (IDE I think it's called?) and it becomes underlined with a squiggly blue line. I seem to remember that, in the IDE box, there were several different types oflogos next to each name, but now only the logo that shows a windows with what looks like green highlighter written on it (you can see it if you type in #If) appears. I've already restarted the computer (via the start menu).

Thanks once again in advance for your help

GK4


ps. I'm Running 'Visual Basic Express 2008' - and downloaded that yesterday (23/11/09)
GK4  Tuesday, November 24, 2009 9:31 PM
MsgBox is an old one

the VB.NET version is

MessageBox.Show
what happens when you type that?
jwavila  Tuesday, November 24, 2009 10:15 PM
MsgBox should still be there somewhere. Its full name is Microsoft.VisualBasic.Interaction.MsgBox so you could give its full name as in:

Microsoft.VisualBasic.Interaction.MsgBox("Hello")

Probably the namespace somehow got omitted from your new project.

You can add an imports statement at the top of the file:

Imports Microsoft.VisualBasic.Interaction.MsgBox("Hello")

Or you can open Solution Explorer, double-click My Project, select the References tab, and make sure Microsoft.VisualBasic is checked at the bottom. (I think that will do it.)

Or you can just start using MessageBox.Show. That's the more .Net-ish version of MsgBox that Microsoft added.

MessageBox.Show("Hello")

Rod
www.vb-helper.com
Rod Stephens  Wednesday, November 25, 2009 3:07 PM
MsgBox is an old one

the VB.NET version is

MessageBox.Show
what happens when you type that?
jwavila  Tuesday, November 24, 2009 10:15 PM
MsgBox should still be there somewhere. Its full name is Microsoft.VisualBasic.Interaction.MsgBox so you could give its full name as in:

Microsoft.VisualBasic.Interaction.MsgBox("Hello")

Probably the namespace somehow got omitted from your new project.

You can add an imports statement at the top of the file:

Imports Microsoft.VisualBasic.Interaction.MsgBox("Hello")

Or you can open Solution Explorer, double-click My Project, select the References tab, and make sure Microsoft.VisualBasic is checked at the bottom. (I think that will do it.)

Or you can just start using MessageBox.Show. That's the more .Net-ish version of MsgBox that Microsoft added.

MessageBox.Show("Hello")

Rod
www.vb-helper.com
Rod Stephens  Wednesday, November 25, 2009 3:07 PM

You can use google to search for other answers

Custom Search

More Threads

• change the size of text in a rich text box
• How to use status strip in VB 2008 Express
• Automatically opening Office Outlook 2007 Visual Basic IDE on machine unlock
• VB NET Debugging - How do show potential error corrections
• Visual Basic 2005 E-Book
• Open word in webbrowser with vb.net2008
• ctrl P
• Connecting to SQL - Newbee
• User Control Keeps turning into Hex?!
• VB.Net & ClickOnce --- No changes to deployment???