为了实现msgbox类似的窗体,创建了两个form1,form2.
form2就有一个label上面放message的。form1_load事件里
if flag = false then
form2.label = "cuowu"
form2.show 1,me
exit sub
end if if flag2 = false then
form2.label = "buxing"
form2.show 1,me
exit sub
end if 下面赋值。
end sub为什么窗体form2显示以后,然后点击form2的关闭按钮。代码继续执行下去。
exit sub没有什么作用。用unload me也没有用。
form2就有一个label上面放message的。form1_load事件里
if flag = false then
form2.label = "cuowu"
form2.show 1,me
exit sub
end if if flag2 = false then
form2.label = "buxing"
form2.show 1,me
exit sub
end if 下面赋值。
end sub为什么窗体form2显示以后,然后点击form2的关闭按钮。代码继续执行下去。
exit sub没有什么作用。用unload me也没有用。
if flag = false then
form2.label = "cuowu"
form2.show 1,me
exit sub
end if if flag2 = false then
form2.label = "buxing"
form2.show 0,me
me.hide
exit sub
end if 下面赋值。
end sub
如果在form2.show 1,me 后加上Unload Me的话,关Form2后form1就不显示了。
Form2.Show 1
If Form2.Visible = False Then
Unload Me
End If
End Sub