Solitaire
Well-known member
I teach VB in college, using the Express edition. I was doing an exercise with my class today using the MessageBox.Show() method in a Windows Forms application. But when I tried entering it in the edit window, it gave me the following error message:
'show' is not a member of 'MessageBox'
and it did not show up in the Intellisense box. Most of my students' computers did work with that method, but one or two of them didn't. Meanwhile, I had to revert to the MsgBox() function to get through the exercise.
Ironically, when running a prepared demo program that includes the MessageBox.Show() method on the school computer, it runs without a problem.
I remember having the same issue at school a year ago (I think we were using VB 2008 at the time). The issue was resolved but I don't remember what the solution was.
My home computer doesn't have that problem. However, I just copied the program from my school disk to my home computer. When I attemped to change the MsgBox() line to MessageBox.Show(), I got the same error message as I did in school:
'show' is not a member of 'MessageBox'
But when I copy and paste the code into a new application, it works correctly with MessageBox.Show().
How do I go about fixing this? The problem seems to be in the project I brought over from school. Does anyone have the solution? I will be back in my classroom on Wednesday and hopefully will be able to resolve the problem by then.
'show' is not a member of 'MessageBox'
and it did not show up in the Intellisense box. Most of my students' computers did work with that method, but one or two of them didn't. Meanwhile, I had to revert to the MsgBox() function to get through the exercise.
Ironically, when running a prepared demo program that includes the MessageBox.Show() method on the school computer, it runs without a problem.
I remember having the same issue at school a year ago (I think we were using VB 2008 at the time). The issue was resolved but I don't remember what the solution was.
My home computer doesn't have that problem. However, I just copied the program from my school disk to my home computer. When I attemped to change the MsgBox() line to MessageBox.Show(), I got the same error message as I did in school:
'show' is not a member of 'MessageBox'
But when I copy and paste the code into a new application, it works correctly with MessageBox.Show().
How do I go about fixing this? The problem seems to be in the project I brought over from school. Does anyone have the solution? I will be back in my classroom on Wednesday and hopefully will be able to resolve the problem by then.