Getox Posted July 9, 2004 Posted July 9, 2004 in vB6 i think it was something like Msg.show 'blah' or am i wrong? anyway how do you do this in VB.NET :confused: Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
wessamzeidan Posted July 9, 2004 Posted July 9, 2004 MessageBox.Show("message") Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Getox Posted July 9, 2004 Author Posted July 9, 2004 Thanks heaps Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
Joe Mamma Posted July 9, 2004 Posted July 9, 2004 (edited) Fyi Its important to remember that MessageBox is defined in the System.Windows.Forms namespace and is fully qualified as System.Windows.Forms.MessageBox and unless you are 'using' System.Windows.Forms in your module, MessageBox will not show up in intellisense without full qualification Edited July 9, 2004 by Joe Mamma Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
wessamzeidan Posted July 9, 2004 Posted July 9, 2004 I have a question, where else can Messagebox be used other than in a windows form???? Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Leaders Iceplug Posted July 12, 2004 Leaders Posted July 12, 2004 I don't understand what you are asking. You can use a MessageBox anywhere... you don't even need to have a form... you can just go MessageBox.Show("x") and a messagebox will show up in mid-air. :) Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
wessamzeidan Posted July 12, 2004 Posted July 12, 2004 and unless you are 'using' System.Windows.Forms in your module, MessageBox will not show up in intellisense without full qualification What I meant was, if windows forms are not used, can MessageBox be used, for example, can it be used in a console appilication. Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Arch4ngel Posted July 12, 2004 Posted July 12, 2004 Heuuuuuuuu..... perfectly .... Just add the right System.xxxxxx and you'll be in business Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Leaders Iceplug Posted July 13, 2004 Leaders Posted July 13, 2004 A reference to System.Windows.Forms has to be added (in the references section)... then you can use it. System.Windows.Forms.MessageBox.Show("Hi.") :) It creates its own window, so you don't have to actually be using a Windows Form. Joe says 'using' for the fact that you can Imports System.Windows.Forms and then you can just say: MessageBox.Show Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
dizzy_boy Posted July 13, 2004 Posted July 13, 2004 MessageBox.Show("message") I was wondering what is the difference between: MessageBox.Show("message") and MsgBox("message") When is best to use one and when the other, beside already mentioned circumstances. Quote
Administrators PlausiblyDamp Posted July 13, 2004 Administrators Posted July 13, 2004 MsgBox is really just a legacy function for compatability with VB6 and earlier, MessageBox.Show is the .Net function and as such is the one you should be using. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
dizzy_boy Posted July 14, 2004 Posted July 14, 2004 MsgBox is really just a legacy function for compatability with VB6 and earlier' date=' MessageBox.Show is the .Net function and as such is the one you should be using.[/quote'] Thanks! I just started on VB.NET (on programming alltogether as well) and I think it is good to get used to the right way of doing things from the start. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.