A
A.A. Fussy
What code would I use for displaying a message box in VB.NET
A.A. Fussy said:What code would I use for displaying a message box in VB.NET
* "Armin Zingler said:Msgbox "Msgbox"
or
Messagebox.Show "Messagebox.Show"
Herfried K. Wagner said:I would use "(" and ")".
;-)
* "Armin Zingler said:They appear automatically.
* "Cor said:Better is "AndAlso"
Herfried K. Wagner said:Somebody told me that some people are out there who don't use an IDE
to develop their applications.
;-)
Scott M. said:There has been much already said about whether to use old VB 6.0
functions like MsgBox() or the new .NET classes like
MessageBox.Show.
My opinion is to stay away from the older VB 6.0 ways and adopt the
newer (OO) .NET ways. Yes, either will work, but MsgBox() is just
going to put in a call to the shared show method of the MessageBox
class, so why not skip an extra step and go straight into the
MessageBox class. There are several other situations like this in
VB.NET.
For example, many of the "old" string functions are now methods of
the string class and many "old" numeric functions are now methods of
the number type classes. The same is also true for "old" date/time
functions now being methods of the date/time classes.
Herfried,
Better is "AndAlso"
* "Armin Zingler said:Not my problem.
Herfried K. Wagner said:Maybe you can add a hint in your signature?
;-)))
Armin Zingler said:I know. But Msgbox is shorter.