Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim temp As Integer = 0
- Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- TextBox1.Text = temp
- End Sub
- Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
- temp = temp + 1
- TextBox1.Text = Integer.Parse(temp)
- 'Integer.Parse(xxx),將變數xxx轉換成Integer
- End Sub
- Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
- temp = temp - 1
- TextBox1.Text = Integer.Parse(temp)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement