计数点击 [英] count click
问题描述
我正在尝试计算单击按钮的次数以及单击按钮10次我想要带消息框。
我尝试过这样做一个if语句和一个循环。使用if语句我似乎无法将其分配给按钮。
如果计数< 10然后
的否则
finalscore =得分
MessageBox.Show(QUOT;你的最后得分是"&安培; finalscore)<无线电通信/> END IF
的ANY1帮助?
我试图计算单击按钮的次数以及单击按钮10次我想带一个消息框。
我尝试使用if语句和循环执行此操作。使用if语句我似乎无法将其分配给按钮。
如果计数< 10然后
Else
finalscore =得分
MessageBox.Show(你的最终得分是&& finalscore)
结束如果
可以帮助吗?
我们可以拥有一个全局变量,并且每次按钮被clieck时都会增加。然后当值为10时,我们可以显示最终得分为...的消息。
感谢
ansuman sahu
我试图计算单击按钮的次数以及单击按钮10次我想带一个消息框。
我试过用if语句和循环来做这件事。使用if语句我似乎无法将其分配给按钮。
如果计数< 10然后
Else
finalscore =得分
MessageBox.Show(你的最终得分是&& finalscore)
结束如果
可以帮助吗?
尝试DIS
如果计数= 10然后
的msgbox(QUOT;得分"&安培; finalscore )
else
count = count + 1
end if if
Halu! :-)在vb中创建一个项目。在表单上添加1按钮,还添加一个文本框。
文本框只显示您已完成的点击次数。如果单击的数量等于10,将显示一个msgbox,并将计数器变量A设置回其初始值零(0)。
调整为整数
私有子Command1_Click()
a = a + 1
Text1.Text = a
如果a = 10那么
MsgBox"你点击按钮 &安培; a& "次'
a = 0
Text1.Text = a
结束如果
结束次级
< br $>
Private Sub Form_Load()
a = 0
End Sub
I am trying to count the amount of times that a button is clicked and when it is clicked 10 times I want to bring a message box.
I have tried doing this with an if statement and a loop. with the if statement i can''t seem to assign it to the button.
If count < 10 Then
Else
finalscore = score
MessageBox.Show("you final score is" & finalscore)
end if
can any1 help?
I am trying to count the amount of times that a button is clicked and when it is clicked 10 times I want to bring a message box.
I have tried doing this with an if statement and a loop. with the if statement i can''t seem to assign it to the button.
If count < 10 Then
Else
finalscore = score
MessageBox.Show("you final score is" & finalscore)
end if
can any1 help?Hi,
Can we have a global variable and have that incremented each time the button is cliecked. Then when the value is 10 we can display a message that the final score is ...
thanks
ansuman sahu
I am trying to count the amount of times that a button is clicked and when it is clicked 10 times I want to bring a message box.
I have tried doing this with an if statement and a loop. with the if statement i can''t seem to assign it to the button.
If count < 10 Then
Else
finalscore = score
MessageBox.Show("you final score is" & finalscore)
end if
can any1 help?try out dis
if count=10 then
msgbox("score is"&finalscore)
else
count=count+1
end if
Halu! :-) Create a project in vb. Add 1 button on the form, also add a textbox.
The textbox just show you the number of clicked you''ve done. If the number of clicked is equal to 10, a msgbox will be displayed, and the counter variable A is set back to its initial value which is zero(0).
Dim a As Integer
Private Sub Command1_Click()
a = a + 1
Text1.Text = a
If a = 10 Then
MsgBox "You click the button " & a & " times"
a = 0
Text1.Text = a
End If
End Sub
Private Sub Form_Load()
a = 0
End Sub
这篇关于计数点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!