vb 沿轨迹滚动小球的启动按钮和结束按钮的程序咋做 各路大神急求
这是这个程序的全部代码各路大神求指教最后一张的其他简单的那个代码咋打也就是启动按钮的代码和结束按钮的代码...
这是这个程序的全部代码 各路大神求指教最后一张的其他简单的那个代码咋打 也就是启动按钮的代码和结束按钮的代码
展开
1个回答
2018-04-28 · 知道合伙人互联网行家
关注
展开全部
Private stopIt As Boolean
Private Sub Command1_Click()
Dim shuzhi As Double
Dim shuzhi1 As Double
Text1.Text = "正在运行"
For shuzhi = 1 To 60000
If stopIt Then Exit Sub
DoEvents
For shuzhi1 = 1 To 20000
Next shuzhi1
Next shuzhi
Text1.Text = "完成"
End Sub
Private Sub Command2_Click()
Text1.Text = "中断运行"
stopIt = True
End Sub
Private Sub Command1_Click()
Dim shuzhi As Double
Dim shuzhi1 As Double
Text1.Text = "正在运行"
For shuzhi = 1 To 60000
If stopIt Then Exit Sub
DoEvents
For shuzhi1 = 1 To 20000
Next shuzhi1
Next shuzhi
Text1.Text = "完成"
End Sub
Private Sub Command2_Click()
Text1.Text = "中断运行"
stopIt = True
End Sub
追问
哥 不能添加定量和变量 只能Command1 Command2 可以帮一下忙吗 Command1是让小球动起来的启动 Command2是让小球停下来的停止
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询