Hi everyone,
I tested a small program (HelloUser) on page 29 (Beginning
VB.NET 2003 textbook) and it wouldn't display the message as it was supposed to.
Here is the code for HelloUser program:
=============================================
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
MessageBox.Show("Hello, " & txtName.Text & _
"! Welcome to Visual Basic .NET.", _
"HelloUser Message")
End Sub
=============================================
When I hit F5 to run this program, I could see the form. The form has a textbox, a label and 2 buttons (1 for submit, 1 for exit). I type my name in the textbox and click the 'OK' button to submit the form.
What should happen is that after I click the 'OK' button to submit, it should open up another window with a message 'Hello, myname! Welcome to Visual Basic.NET.' In my case, I could only see another pop up window without any message in it. There is no error message when I run it so it's hard for me to tell what's wrong with it. I tried this code on my friend's computer and it works fine.
Please helps.
Jane