Dim i As Integer
Private Sub Command1_Click()
Dim xlh As String
Dim enstr As String
Dim str() As String
xlh = Trim(Text1.Text)
enstr = encrypt("asd", xlh)
ss = Len(enstr) - Len(Replace(enstr, "@", ""))
If (ss <> 7) Then
MsgBox ("您输入的序列号不正确,请检查!")
Else
Text1.Text = ""
Timer1.Enabled = True '滚动条开始,执行Timer1_Timer()
'下边的要求在滚动条到头后才显示,我把下边这段程序叫pro1
str = Split(enstr, "@", -1, vbBinaryCompare)
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = False
Picture5.Visible = False
Picture1.Visible = True
yue.Caption = str(0)
ri.Caption = str(1)
gpdm1.Caption = str(2)
gp1mr.Caption = str(3)
gp1zf.Caption = str(4)
gpdm2.Caption = str(5)
gp2mr.Caption = str(6)
gp2zf.Caption = str(7)
End If
End SubPrivate Sub Timer1_Timer() If i = 100 Then
'滚动条结束了,那么如何在这个时候执行pro1呢?
End If ccrpProgressBar1.Value = i i = i + 1 '变量i自增
End Sub
Private Sub Command1_Click()
Dim xlh As String
Dim enstr As String
Dim str() As String
xlh = Trim(Text1.Text)
enstr = encrypt("asd", xlh)
ss = Len(enstr) - Len(Replace(enstr, "@", ""))
If (ss <> 7) Then
MsgBox ("您输入的序列号不正确,请检查!")
Else
Text1.Text = ""
Timer1.Enabled = True '滚动条开始,执行Timer1_Timer()
'下边的要求在滚动条到头后才显示,我把下边这段程序叫pro1
str = Split(enstr, "@", -1, vbBinaryCompare)
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = False
Picture5.Visible = False
Picture1.Visible = True
yue.Caption = str(0)
ri.Caption = str(1)
gpdm1.Caption = str(2)
gp1mr.Caption = str(3)
gp1zf.Caption = str(4)
gpdm2.Caption = str(5)
gp2mr.Caption = str(6)
gp2zf.Caption = str(7)
End If
End SubPrivate Sub Timer1_Timer() If i = 100 Then
'滚动条结束了,那么如何在这个时候执行pro1呢?
End If ccrpProgressBar1.Value = i i = i + 1 '变量i自增
End Sub
Private Sub Command1_Click()
Dim xlh As String
Dim enstr As String
Dim str() As String
xlh = Trim(Text1.Text)
enstr = encrypt("asd", xlh)
ss = Len(enstr) - Len(Replace(enstr, "@", ""))
If (ss <> 7) Then
MsgBox ("您输入的序列号不正确,请检查!")
Else
Text1.Text = ""
Timer1.Enabled = True '滚动条开始,执行Timer1_Timer()
'下边的要求在滚动条到头后才显示,我把下边这段程序叫pro1
if Timer1.enabled=false then '或者 if i>=100 then
str = Split(enstr, "@", -1, vbBinaryCompare)
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = False
Picture5.Visible = False
Picture1.Visible = True
yue.Caption = str(0)
ri.Caption = str(1)
gpdm1.Caption = str(2)
gp1mr.Caption = str(3)
gp1zf.Caption = str(4)
gpdm2.Caption = str(5)
gp2mr.Caption = str(6)
gp2zf.Caption = str(7)
endif
End If
End Sub Private Sub Timer1_Timer() If i >= 100 Then
'滚动条结束了,那么如何在这个时候执行pro1呢?
Timer1.enabled=false
End If ccrpProgressBar1.Value = i i = i + 1 '变量i自增
End Sub
也没有消失 而且pro1程序也没执行
Dim i As Integer
Private Sub Command1_Click()
Dim xlh As String
Dim enstr As String
Dim str() As String
xlh = Trim(Text1.Text)
enstr = encrypt("asd", xlh)
ss = Len(enstr) - Len(Replace(enstr, "@", ""))
If (ss <> 7) Then
MsgBox ("您输入的序列号不正确,请检查!")
Else
Text1.Text = ""
Timer1.Enabled = True '滚动条开始,执行Timer1_Timer()
'下边的要求在滚动条到头后才显示,我把下边这段程序叫pro1,移到Timer中.
End If
End Sub Private Sub Timer1_Timer() If i >= 100 Then
'滚动条结束了,执行pro1
Timer1.enabled=false
str = Split(enstr, "@", -1, vbBinaryCompare)
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = False
Picture5.Visible = False
Picture1.Visible = True
yue.Caption = str(0)
ri.Caption = str(1)
gpdm1.Caption = str(2)
gp1mr.Caption = str(3)
gp1zf.Caption = str(4)
gpdm2.Caption = str(5)
gp2mr.Caption = str(6)
gp2zf.Caption = str(7)
End If ccrpProgressBar1.Value = i i = i + 1 '变量i自增
End Sub
提示这里错误 , 无法识别这个参数不能直接拿过来吧?
不能识别 。。 应该怎么写呢
Dim xlh As String
Dim enstr As String
Dim str() As String
If i >= 100 Then
Timer1.Enabled = False
ccrpProgressBar1.Visible = False '加完就报错,意思值应该在最大和最小值之间
str = Split(enstr, "@", -1, vbBinaryCompare)
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = False
Picture5.Visible = False
Picture1.Visible = True
yue.Caption = str(0)
ri.Caption = str(1)
gpdm1.Caption = str(2)
gp1mr.Caption = str(3)
gp1zf.Caption = str(4)
gpdm2.Caption = str(5)
gp2mr.Caption = str(6)
gp2zf.Caption = str(7)
End If
ccrpProgressBar1.Visible = True
ccrpProgressBar1.Value = i
i = i + 1 '变量i自增
End Sub现在别的的都正常 有个问题是 进度条走到头以后为什么不消失 ?
我加个ccrpProgressBar1.Visible = False 就报错