Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

messagebox is not declared 1

Status
Not open for further replies.

hermanlaksko

Programmer
Aug 26, 2001
934
0
16
DK
I would like to use messagebox in my code but get the above error msg.
I use MsgBox but think that messagebox is more flexable and have more features.

Do I need a messagebox function to get this to work or what do I have to "import"?

Herman
Say no to macros
 
MsgBox() is a function and MessageBox is a class in System.Windows.Forms, which has the Show() method.

[pre]MsgBox("Hello !")[/pre]

does the same as

[pre]MessageBox.Show("Hello !")[/pre]
 
Hi Mikrom

Thk for replying to my Q
Ok so as I understand you there is NO diff btwn the two MagBox and MessageBox?
I was undet the impression that the latter had more options etc.

Herman
Say no to macros
 
Excellent and well explained - Thx for clearing this up Mikrom

Herman
Say no to macros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top