close
3478

VB 記憶圖片的遊戲

就是我有64張圖片(image)2張2張疊起來大概長這樣 上 3 4 7 8 .. 下 1 2 5 6 ..3478都一樣

12圖一樣

56圖一樣底面是2張2張一樣的我寫的程式碼是按上面的圖(按2張)

底面圖如果一樣就消失(上下都消失)不一樣

上面圖就復原(上面出現)我用IF比較上面的圖---Private Sub Timer1_Timer()If Image3.Visible = False And Image4.Visible = False ThenImage1.Visible = FalseImage2.Visible = FalseEnd IfIf Image7.Visible = False And Image8.Visible = False ThenImage5.Visible = FalseImage6.Visible = FalseEnd If---If Image3.Visible = False And Image7.Visible = False And Image4.Visible = True ThenImage3.Visible = TrueImage7.Visible = TrueEnd IfIf Image3.Visible = False And Image8.Visible = False And Image4.Visible = True ThenImage3.Visible = TrueImage8.Visible = TrueEnd IfIf Image4.Visible = False And Image7.Visible = False And Image3.Visible = True ThenImage4.Visible = TrueImage7.Visible = TrueEnd IfIf Image4.Visible = False And Image8.Visible = False And Image3.Visible = True ThenImage4.Visible = TrueImage8.Visible = TrueEnd IfEnd Sub---光是4張圖我就要打這麼多(對不起

我很笨

我只會這樣打)我要做32張(加下有64張..會打到手殘..)希望有大大能交我簡化他= =或是有別種好方法

簡單易懂(就是希望能短一點..)用別種方法還請能附上註解..我才不會不懂謝謝
希If Image3.Visible = False And Image4.Visible = False ThenImage1.Visible = FalseImage2.Visible = FalseEnd IfIf Image7.Visible = False And Image8.Visible = False ThenImage5.Visible = FalseImage6.Visible = FalseElse

arrow
arrow

    Flex XC 3401 發表在 痞客邦 留言(0) 人氣()