Starfleeter
Member
- Joined
- Oct 31, 2010
- Messages
- 5
- Programming Experience
- Beginner
EDIT: Oops, sorry, this post should probably go in the VB.net forum but I can't find a way to delete it.
So I'm brand spanking new and trying to learn VB.net on my own but am doing a horrible job. It seems I can follow basic tutorial instructions and do them correctly but not learn how to do things on my own.
Anyway, I'm trying to do simple stuff first like have a textbox and a button that I click that adds 1 to the value in the textbox and makes the textbox output that value but I can't get it to work for the life of me. I know it's probably something really easy but yeah, I just can't figure it out after scouring the net now for about 45 minutes.
So I'm brand spanking new and trying to learn VB.net on my own but am doing a horrible job. It seems I can follow basic tutorial instructions and do them correctly but not learn how to do things on my own.
Anyway, I'm trying to do simple stuff first like have a textbox and a button that I click that adds 1 to the value in the textbox and makes the textbox output that value but I can't get it to work for the life of me. I know it's probably something really easy but yeah, I just can't figure it out after scouring the net now for about 45 minutes.
VB.NET:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtStrength.TextChanged
txtStrength.Text = 5
End Sub
Private Sub btnStrengthPlus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStrengthPlus.Click
Dim c As Integer
c = Val(txtStrength.Text) + 1
txtStrength.Text = c
End Sub