2个回答
展开全部
楼上的写的代码有bug,那样的话只是一次显示下一个form的动作,你依次点仿岁扰机完之后确实显示,不过你关闭了form2,再点击那三个label 会是什么结果?
当然是只点机一个雀和label第二个form旧显示了 所以,具体的代码如下更好(你直接拖三个label,把代码放入旧可以测试):
Dim bl1, bl2, bl3 As Boolean '声明三个布尔标志
Private Sub Label1_Click()
bl1 = True '布尔bl1设置为true
If bl1 = True And bl2 = True And bl3 = True Then '全部布尔设置为true,备旦才显示form2
Form2.Show
bl1 = False ''布尔设置为初始
End If
End Sub
Private Sub Label2_Click()
bl2 = True
If bl1 = True And bl2 = True And bl3 = True Then
Form2.Show
bl2 = False
End If
End Sub
Private Sub Label3_Click()
bl3 = True
If bl1 = True And bl2 = True And bl3 = True Then
Form2.Show
bl3 = False
End If
End Sub
当然是只点机一个雀和label第二个form旧显示了 所以,具体的代码如下更好(你直接拖三个label,把代码放入旧可以测试):
Dim bl1, bl2, bl3 As Boolean '声明三个布尔标志
Private Sub Label1_Click()
bl1 = True '布尔bl1设置为true
If bl1 = True And bl2 = True And bl3 = True Then '全部布尔设置为true,备旦才显示form2
Form2.Show
bl1 = False ''布尔设置为初始
End If
End Sub
Private Sub Label2_Click()
bl2 = True
If bl1 = True And bl2 = True And bl3 = True Then
Form2.Show
bl2 = False
End If
End Sub
Private Sub Label3_Click()
bl3 = True
If bl1 = True And bl2 = True And bl3 = True Then
Form2.Show
bl3 = False
End If
End Sub
展开全部
Dim flag1, flag2, flag3 As Boolean
Private Sub Label1_Click()
flag1 = True
If flag1 = True And flag2 = True And flag3 = True Then Form2.Show
End Sub
Private Sub Label2_Click()
flag2 = True
If flag1 = True And flag2 = True And flag3 = True Then Form2.Show
End Sub
Private Sub Label3_Click()
flag3 = True
If flag1 = True And flag2 = True And flag3 = True Then Form2.Show
End Sub
Private Sub Label1_Click()
flag1 = True
If flag1 = True And flag2 = True And flag3 = True Then Form2.Show
End Sub
Private Sub Label2_Click()
flag2 = True
If flag1 = True And flag2 = True And flag3 = True Then Form2.Show
End Sub
Private Sub Label3_Click()
flag3 = True
If flag1 = True And flag2 = True And flag3 = True Then Form2.Show
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询