作者BearWu (B.r)
看板Visual_Basic
标题Re: [VB6 ] 请问一下喔
时间Fri Apr 14 00:49:35 2006
在程式一执行 先定义个a
为 0
Private Sub Command2_Click()
a = a + 1
if a mod 2 = 0 then
Image2.Visible = true
else
Image2.Visible = false
end if
end sub
另一种写法
Private Sub Command2_Click()
if Image2.Visible = True then
Image2.Visible = False
else
Image2.Visible = True
end if
End Sub
: Private Sub Command2_Click()
: Image2.Visible = True
: End Sub
: 这是按一下显示图片
: 那如果要按一下显示...再按一下不显示
: 要怎麽做呢?
: 请帮我解答一下 谢谢^^
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.113.171.197
※ 编辑: BearWu 来自: 59.113.171.197 (04/14 00:55)
1F:推 smallcoldair:第一种写法要加上 Static a 哦 ^^ 04/14 00:58
2F:推 luludo:喔喔...谢谢你们喔...不过我想问 a mod 2 = 0 是什麽意思 04/14 00:59
3F:→ luludo:这一句我看不懂 04/14 01:00
4F:推 BearWu:mod 2 也就是,当a 等於偶数的时候就开图,单数就关图 04/14 01:48