刚开始学习的Visual Basic ..使用循环通过按钮单击更改标签文本?
此使用循环时,工作原理:框信息弹出直到完成
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim d As Integer = 1
Do While d < 5
MessageBox.Show("Value: " & d)
d = d + 1
Loop
End Sub
当我想要使用它的标签文本它提供了与点击
最终输出Label2.Text = ("The value of i is: " & i)
我该如何让它只在点击按钮时循环?我必须添加if语句吗?