小编ben*_*ngi的帖子

通过一个视觉基础增加一个值我被卡住了

我正在尝试编写一个代码,在单击visual basic中的按钮后将值增加一个.这些是我到目前为止尝试过的代码但是我没有实现我的目标

代码1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
   Dim votecount As Integer = Integer.Parse(showcountwinnie.Text)
   votecount += 1
   showcountwinnie.Text = votecount.ToString()
End Sub
Run Code Online (Sandbox Code Playgroud)

代码二

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim votes As Integer
  votes = 0
  votes += 1
  votes = showcountwinnie.Text
End Sub
Run Code Online (Sandbox Code Playgroud)

代码三

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
   Dim votewinnie As Integer
   votewinnie = showcountwinnie.value
   votewinnie = votewinnie …
Run Code Online (Sandbox Code Playgroud)

vb.net

1
推荐指数
1
解决办法
3万
查看次数

标签 统计

vb.net ×1