Who can tell me the difference between MessageBox.Show and MsgBox in VB.NET?

Recommended Answers

All 3 Replies

MessageBox is from the .NET framework and can ben called by any of the .NET languages. MsgBox is older VB only.

MsgBox is the default one, you show a string and wait for the user to click the msgbox button
in Messagebox.show you can add a custom buttons and icon etc..

MessageBox.Show(message, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)

You can do that with both functions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.