VB单击六次Command1以后, Label1增加一个数字,从0001开始的代码
展开全部
Private Sub Command1_Click()
Static i As Long
i = i + 1
If i >= 6 Then
i = 0
Label1.Caption = Val(Label1.Caption) + 1
End If
End Sub
Private Sub Form_Load()
Label1.Caption = "0001"
End Sub
Static i As Long
i = i + 1
If i >= 6 Then
i = 0
Label1.Caption = Val(Label1.Caption) + 1
End If
End Sub
Private Sub Form_Load()
Label1.Caption = "0001"
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim i As Integer
Dim j As Integer
Private Sub command1_click()
If i < 6 Then
i = i + 1
Else
i = 1
j = j + 1
Label1.Caption = Format(j, "0000")
End If
End Sub
Private Sub Form_Load()
i = 1
j = 1
Label1.Caption = "0001"
End Sub
Dim j As Integer
Private Sub command1_click()
If i < 6 Then
i = i + 1
Else
i = 1
j = j + 1
Label1.Caption = Format(j, "0000")
End If
End Sub
Private Sub Form_Load()
i = 1
j = 1
Label1.Caption = "0001"
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
int s=1;
int time=1;
public command1_click(....)
{
if(time=6)
{time=1;s=s+1;}
}
this.label1.text=s.tostring();
int time=1;
public command1_click(....)
{
if(time=6)
{time=1;s=s+1;}
}
this.label1.text=s.tostring();
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询