VB出现的Private Sub Form_Load()问题
PrivateSubForm_Load()(此处出现黄色字)IfApp.PrevInstanceThenMsgBox"程序已运行,请关闭后重试!"EndEndIfLabe...
Private Sub Form_Load()(此处出现黄色字)
If App.PrevInstance Then
MsgBox "程序已运行,请关闭后重试!"
End
End If
Label2.Caption = Now
Timer2.Enabled = True
Timer2.Interval = 1000
End Sub
Private Sub Timer1_Timer()(此处出现黄字)
If ProgressBar1.Value < 100 Then
ProgressBar1.Value = ProgressBar1.Value + 10
End If
If ProgressBar1.Value = 0 Then
Label1.Caption = "正在载入中,请稍后..."
Else
If ProgressBar1.Value = 10 Then
Label1.Caption = "已完成10%..."
Else
If ProgressBar1.Value = 20 Then
Label1.Caption = "已完成20%..."
Else
If ProgressBar1.Value = 30 Then
Label1.Caption = "已完成30%..."
Else
If ProgressBar1.Value = 50 Then
Label1.Caption = "已完成50%..."
Else
If ProgressBar1.Value = 60 Then
Label1.Caption = "已完成60%..."
Else
If ProgressBar1.Value = 70 Then
Label1.Caption = "已完成70%..."
Else
If ProgressBar1.Value = 80 Then
Label1.Caption = "已完成80%..."
Else
If ProgressBar1.Value = 90 Then
Label1.Caption = "载入完毕"
Else
If ProgressBar1.Value = 100 Then
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = False
Command7.Enabled = True
ProgressBar1.Visible = False
Label1.Visible = False
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
Private Sub Timer2_Timer()(此处出现黄字)
Label2.Caption = Now
End Sub
这三个地方出现黄字是什么原因呢!
程序能够正常运行,但是所有的按钮都失效了,关都关不上 展开
If App.PrevInstance Then
MsgBox "程序已运行,请关闭后重试!"
End
End If
Label2.Caption = Now
Timer2.Enabled = True
Timer2.Interval = 1000
End Sub
Private Sub Timer1_Timer()(此处出现黄字)
If ProgressBar1.Value < 100 Then
ProgressBar1.Value = ProgressBar1.Value + 10
End If
If ProgressBar1.Value = 0 Then
Label1.Caption = "正在载入中,请稍后..."
Else
If ProgressBar1.Value = 10 Then
Label1.Caption = "已完成10%..."
Else
If ProgressBar1.Value = 20 Then
Label1.Caption = "已完成20%..."
Else
If ProgressBar1.Value = 30 Then
Label1.Caption = "已完成30%..."
Else
If ProgressBar1.Value = 50 Then
Label1.Caption = "已完成50%..."
Else
If ProgressBar1.Value = 60 Then
Label1.Caption = "已完成60%..."
Else
If ProgressBar1.Value = 70 Then
Label1.Caption = "已完成70%..."
Else
If ProgressBar1.Value = 80 Then
Label1.Caption = "已完成80%..."
Else
If ProgressBar1.Value = 90 Then
Label1.Caption = "载入完毕"
Else
If ProgressBar1.Value = 100 Then
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = False
Command7.Enabled = True
ProgressBar1.Visible = False
Label1.Visible = False
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
Private Sub Timer2_Timer()(此处出现黄字)
Label2.Caption = Now
End Sub
这三个地方出现黄字是什么原因呢!
程序能够正常运行,但是所有的按钮都失效了,关都关不上 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询