|
-
Jan 18th, 2003, 09:57 AM
#1
Thread Starter
Lively Member
VB.NET: MsgBox vs Messagebox.Show...
VB.NET: MsgBox vs Messagebox.Show...
This is a VERY small issue, but it's confusing me. I doubt anyone, including myself, will be losing sleep (possibly gaining some).
I'm reading a VERY BASIC VB.NET book (it's turning out to not be so basic - a new comer would have given up by now), and the author uses the MsgBox function to display simple messages in very simple VB.NET programs.
The strange thing is that the useability of 'MsgBox' in my VB.NET seems to be inconsistent: in one project, VB recognized the 'MsgBox' function, put up the intellisense formation of the function, and all was well ('MsgBox' was within a click event).
Next, when I started a new project and put 'MsgBox' within the 'form_load' event, the text was underlined as if it wasn't validated or recognized, and when I ran the program anyway I received the build error: "'MsgBox' is a namespace, and so it is not a valid expression."
So, am I doing something wrong or is the author of this book forgetting some detail? I can switch between my 2 projects and add in MsgBoxes to the 1st one, but the 2nd one never accepts them. Both programs like the more VB.Nettish 'Messagebox.show' control. Why didn't the author use this one?
I'm confused, but, again, this is not a big issue.
Thanks,
Ed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|