我在VB.NET中写过一个二十一点游戏/程序。到目前为止,我已经将扑克牌图像编码显示和隐藏。例如,程序从1 - 13(Ace - King)中随机抽取数字,并在标签中显示这些随机数。如果标签中有1,则图片框中的Ace图像将变为可见。
以下是我的引用代码:
Public Class frmBlackJack
Public Counter As Integer = 0
Private Sub btnDrawCard_Click(sender As Object, e As EventArgs) Handles btnDrawCard.Click
Randomize()
Counter = Counter + 1
Dim Card1 As Integer
Dim Card2 As Integer
Dim Card3 As Integer
Dim Card4 As Integer
Dim Card5 As Integer
If lblCard1.Text = "1" Then
picCard1Ace.Visible = True
End If
If lblCard2.Text = "1" Then
picCard2Ace.Visible = True
End If
If lblCard3.Text = "1" Then
picCard3Ace.Visible = True
End If
If lblCard4.Text = "1" Then
picCard4Ace.Visible = True
End If
If lblCard5.Text = "1" Then
picCard5Ace.Visible = True
End If
If lblCard1.Text = "2" Then
picCard1Two.Visible = True
End If
If lblCard2.Text = "2" Then
picCard2Two.Visible = True
End If
If lblCard3.Text = "2" Then
picCard3Two.Visible = True
End If
If lblCard4.Text = "2" Then
picCard4Two.Visible = True
End If
If lblCard5.Text = "2" Then
picCard5Two.Visible = True
End If
If lblCard1.Text = "3" Then
picCard1Three.Visible = True
End If
If lblCard2.Text = "3" Then
picCard2Three.Visible = True
End If
If lblCard3.Text = "3" Then
picCard3Three.Visible = True
End If
If lblCard4.Text = "3" Then
picCard4Three.Visible = True
End If
If lblCard5.Text = "3" Then
picCard5Three.Visible = True
End If
If lblCard1.Text = "4" Then
picCard1Four.Visible = True
End If
If lblCard2.Text = "4" Then
picCard2Four.Visible = True
End If
If lblCard3.Text = "4" Then
picCard3Four.Visible = True
End If
If lblCard4.Text = "4" Then
picCard4Five.Visible = True
End If
If lblCard5.Text = "4" Then
picCard5Four.Visible = True
End If
If lblCard1.Text = "5" Then
picCard1Five.Visible = True
End If
If lblCard2.Text = "5" Then
picCard2Five.Visible = True
End If
If lblCard3.Text = "5" Then
picCard3Five.Visible = True
End If
If lblCard4.Text = "5" Then
picCard4Five.Visible = True
End If
If lblCard5.Text = "5" Then
picCard5Five.Visible = True
End If
If lblCard1.Text = "6" Then
picCard1Six.Visible = True
End If
If lblCard2.Text = "6" Then
picCard2Six.Visible = True
End If
If lblCard3.Text = "6" Then
picCard3Six.Visible = True
End If
If lblCard4.Text = "6" Then
picCard4Six.Visible = True
End If
If lblCard5.Text = "6" Then
picCard5Six.Visible = True
End If
If lblCard1.Text = "7" Then
picCard1Seven.Visible = True
End If
If lblCard2.Text = "7" Then
picCard2Seven.Visible = True
End If
If lblCard3.Text = "7" Then
picCard3Seven.Visible = True
End If
If lblCard4.Text = "7" Then
picCard4Seven.Visible = True
End If
If lblCard5.Text = "7" Then
picCard5Seven.Visible = True
End If
If lblCard1.Text = "8" Then
picCard1Eight.Visible = True
End If
If lblCard2.Text = "8" Then
picCard2Eight.Visible = True
End If
If lblCard3.Text = "8" Then
picCard3Eight.Visible = True
End If
If lblCard4.Text = "8" Then
picCard4Eight.Visible = True
End If
If lblCard5.Text = "8" Then
picCard5Eight.Visible = True
End If
If lblCard1.Text = "9" Then
picCard1Nine.Visible = True
End If
If lblCard2.Text = "9" Then
picCard2Nine.Visible = True
End If
If lblCard3.Text = "9" Then
picCard3Nine.Visible = True
End If
If lblCard4.Text = "9" Then
picCard4Nine.Visible = True
End If
If lblCard5.Text = "9" Then
picCard5Nine.Visible = True
End If
If lblCard1.Text = "10" Then
picCard1Ten.Visible = True
End If
If lblCard2.Text = "10" Then
picCard2Ten.Visible = True
End If
If lblCard3.Text = "10" Then
picCard3Ten.Visible = True
End If
If lblCard4.Text = "10" Then
picCard4Ten.Visible = True
End If
If lblCard5.Text = "10" Then
picCard5Ten.Visible = True
End If
If lblCard1.Text = "11" Then
picCard1Eleven.Visible = True
End If
If lblCard2.Text = "11" Then
picCard2Eleven.Visible = True
End If
If lblCard3.Text = "11" Then
picCard3Eleven.Visible = True
End If
If lblCard4.Text = "11" Then
picCard4Eleven.Visible = True
End If
If lblCard5.Text = "11" Then
picCard5Eleven.Visible = True
End If
If lblCard1.Text = "12" Then
picCard1Queen.Visible = True
End If
If lblCard2.Text = "12" Then
picCard2Queen.Visible = True
End If
If lblCard3.Text = "12" Then
picCard3Queen.Visible = True
End If
If lblCard4.Text = "12" Then
picCard4Queen.Visible = True
End If
If lblCard5.Text = "12" Then
picCard5Queen.Visible = True
End If
If lblCard1.Text = "13" Then
picCard1King.Visible = True
End If
If lblCard2.Text = "13" Then
picCard2King.Visible = True
End If
If lblCard3.Text = "13" Then
picCard3King.Visible = True
End If
If lblCard4.Text = "13" Then
picCard4King.Visible = True
End If
If lblCard5.Text = "13" Then
picCard5King.Visible = True
End If
If Counter >= 1 Then
btnCheckScore.Enabled = True
End If
If Counter = 1 Then
Card1 = (10 * Rnd() + 1)
lblCard1.Text = Card1
lblCard1.Visible = True
End If
If Counter = 2 Then
Card2 = (10 * Rnd() + 1)
lblCard2.Text = Card2
lblCard2.Visible = True
End If
If Counter = 3 Then
Card3 = (10 * Rnd() + 1)
lblCard3.Text = Card3
lblCard3.Visible = True
End If
If Counter = 4 Then
Card4 = (10 * Rnd() + 1)
lblCard4.Text = Card4
lblCard4.Visible = True
End If
If Counter = 5 Then
Card5 = (10 * Rnd() + 1)
lblCard5.Text = Card5
lblCard5.Visible = True
End If
If Counter > 5 Then
MsgBox("You can't draw anymore cards!")
End If
End Sub
Private Sub frmBlackJack_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim ComputerCard1 As Integer
Dim ComputerCard2 As Integer
Dim ComputerCard3 As Integer
ComputerCard1 = (10 * Rnd() + 1)
ComputerCard2 = (10 * Rnd() + 1)
ComputerCard3 = (10 * Rnd() + 1)
lblComputerCard1.Text = ComputerCard1
lblComputerCard2.Text = ComputerCard2
lblComputerCard3.Text = ComputerCard3
lblComputerScore.Visible = False
lblYourScore.Visible = False
btnCheckScore.Enabled = False
End Sub
Private Sub btnCheckScore_Click(sender As Object, e As EventArgs) Handles btnCheckScore.Click
Dim PlayerSum As Integer
Dim ComputerSum As Integer
Dim youWonTitle As String = "You Won!"
Dim youWonMsg As String = "Great work! Play again?"
Dim youLostTitle As String = "You Lost!"
Dim youLostMsg As String = "Better luck next time! Play again?"
Dim youDrewTitle As String = "You Drew"
Dim youDrewMsg As String = "That was close! Play again?"
Dim style As MsgBoxStyle = MsgBoxStyle.YesNo
lblComputerCard1.Visible = True
lblComputerCard2.Visible = True
lblComputerCard3.Visible = True
btnDrawCard.Enabled = False
If Counter < 1 Then
PlayerSum = Val(lblCard1.Text)
lblPLayerScore.Text = PlayerSum
lblPLayerScore.Visible = True
lblYourScore.Visible = True
End If
If Counter > 1 Then
PlayerSum = Val(lblCard1.Text) + Val(lblCard2.Text)
lblPLayerScore.Text = PlayerSum
lblPLayerScore.Visible = True
lblYourScore.Visible = True
End If
If Counter > 2 Then
PlayerSum = Val(lblCard1.Text) + Val(lblCard2.Text) + Val(lblCard3.Text)
lblPLayerScore.Text = PlayerSum
lblPLayerScore.Visible = True
lblYourScore.Visible = True
End If
If Counter > 3 Then
PlayerSum = Val(lblCard1.Text) + Val(lblCard2.Text) + Val(lblCard3.Text) + Val(lblCard4.Text)
lblPLayerScore.Text = PlayerSum
lblPLayerScore.Visible = True
lblYourScore.Visible = True
End If
If Counter > 4 Then
PlayerSum = Val(lblCard1.Text) + Val(lblCard2.Text) + Val(lblCard3.Text) + Val(lblCard4.Text) + Val(lblCard5.Text)
lblPLayerScore.Text = PlayerSum
lblPLayerScore.Visible = True
lblYourScore.Visible = True
End If
ComputerSum = Val(lblComputerCard1.Text) + Val(lblComputerCard2.Text) + Val(lblComputerCard3.Text)
lblComputerTotal.Text = ComputerSum
lblComputerScore.Visible = True
lblComputerTotal.Visible = True
If lblCard1.Text = 1 Then
End If
If PlayerSum < 21 And PlayerSum > ComputerSum Then
Dim responseYouWon = MsgBox(youWonMsg, style, youWonTitle)
If responseYouWon = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf ComputerSum > 21 And PlayerSum < 21 Then
Dim responseYouWon = MsgBox(youWonMsg, style, youWonTitle)
If responseYouWon = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf ComputerSum > 21 And ComputerSum < 21 Then
Dim responseYouWon = MsgBox(youWonMsg, style, youWonTitle)
If responseYouWon = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf PlayerSum = 21 And ComputerSum > 21 Then
Dim responseYouWon = MsgBox(youWonMsg, style, youWonTitle)
If responseYouWon = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf PlayerSum = 21 And ComputerSum < 21 Then
Dim responseYouWon = MsgBox(youWonMsg, style, youWonTitle)
If responseYouWon = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf ComputerSum < 21 And ComputerSum > PlayerSum Then
Dim responseYouLost = MsgBox(youLostMsg, style, youLostTitle)
If responseYouLost = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf PlayerSum > 21 And ComputerSum < 21 Then
Dim responseYouLost = MsgBox(youLostMsg, style, youLostTitle)
If responseYouLost = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
ElseIf ComputerSum = 21 And PlayerSum <> 21 Then
Dim responseYouLost = MsgBox(youLostMsg, style, youLostTitle)
If responseYouLost = MsgBoxResult.Yes Then
btnPlayAgain.PerformClick()
Else
btnQuit.PerformClick()
End If
End If
If lblCard1.Text = "1" Then
picCard1Ace.Visible = True
End If
If lblCard2.Text = "1" Then
picCard2Ace.Visible = True
End If
If lblCard3.Text = "1" Then
picCard3Ace.Visible = True
End If
If lblCard4.Text = "1" Then
picCard4Ace.Visible = True
End If
If lblCard5.Text = "1" Then
picCard5Ace.Visible = True
End If
If lblCard1.Text = "2" Then
picCard1Two.Visible = True
End If
If lblCard2.Text = "2" Then
picCard2Two.Visible = True
End If
If lblCard3.Text = "2" Then
picCard3Two.Visible = True
End If
If lblCard4.Text = "2" Then
picCard4Two.Visible = True
End If
If lblCard5.Text = "2" Then
picCard5Two.Visible = True
End If
If lblCard1.Text = "3" Then
picCard1Three.Visible = True
End If
If lblCard2.Text = "3" Then
picCard2Three.Visible = True
End If
If lblCard3.Text = "3" Then
picCard3Three.Visible = True
End If
If lblCard4.Text = "3" Then
picCard4Three.Visible = True
End If
If lblCard5.Text = "3" Then
picCard5Three.Visible = True
End If
If lblCard1.Text = "4" Then
picCard1Four.Visible = True
End If
If lblCard2.Text = "4" Then
picCard2Four.Visible = True
End If
If lblCard3.Text = "4" Then
picCard3Four.Visible = True
End If
If lblCard4.Text = "4" Then
picCard4Five.Visible = True
End If
If lblCard5.Text = "4" Then
picCard5Four.Visible = True
End If
If lblCard1.Text = "5" Then
picCard1Five.Visible = True
End If
If lblCard2.Text = "5" Then
picCard2Five.Visible = True
End If
If lblCard3.Text = "5" Then
picCard3Five.Visible = True
End If
If lblCard4.Text = "5" Then
picCard4Five.Visible = True
End If
If lblCard5.Text = "5" Then
picCard5Five.Visible = True
End If
If lblCard1.Text = "6" Then
picCard1Six.Visible = True
End If
If lblCard2.Text = "6" Then
picCard2Six.Visible = True
End If
If lblCard3.Text = "6" Then
picCard3Six.Visible = True
End If
If lblCard4.Text = "6" Then
picCard4Six.Visible = True
End If
If lblCard5.Text = "6" Then
picCard5Six.Visible = True
End If
If lblCard1.Text = "7" Then
picCard1Seven.Visible = True
End If
If lblCard2.Text = "7" Then
picCard2Seven.Visible = True
End If
If lblCard3.Text = "7" Then
picCard3Seven.Visible = True
End If
If lblCard4.Text = "7" Then
picCard4Seven.Visible = True
End If
If lblCard5.Text = "7" Then
picCard5Seven.Visible = True
End If
If lblCard1.Text = "8" Then
picCard1Eight.Visible = True
End If
If lblCard2.Text = "8" Then
picCard2Eight.Visible = True
End If
If lblCard3.Text = "8" Then
picCard3Eight.Visible = True
End If
If lblCard4.Text = "8" Then
picCard4Eight.Visible = True
End If
If lblCard5.Text = "8" Then
picCard5Eight.Visible = True
End If
If lblCard1.Text = "9" Then
picCard1Nine.Visible = True
End If
If lblCard2.Text = "9" Then
picCard2Nine.Visible = True
End If
If lblCard3.Text = "9" Then
picCard3Nine.Visible = True
End If
If lblCard4.Text = "9" Then
picCard4Nine.Visible = True
End If
If lblCard5.Text = "9" Then
picCard5Nine.Visible = True
End If
If lblCard1.Text = "10" Then
picCard1Ten.Visible = True
End If
If lblCard2.Text = "10" Then
picCard2Ten.Visible = True
End If
If lblCard3.Text = "10" Then
picCard3Ten.Visible = True
End If
If lblCard4.Text = "10" Then
picCard4Ten.Visible = True
End If
If lblCard5.Text = "10" Then
picCard5Ten.Visible = True
End If
If lblCard1.Text = "11" Then
picCard1Eleven.Visible = True
End If
If lblCard2.Text = "11" Then
picCard2Eleven.Visible = True
End If
If lblCard3.Text = "11" Then
picCard3Eleven.Visible = True
End If
If lblCard4.Text = "11" Then
picCard4Eleven.Visible = True
End If
If lblCard5.Text = "11" Then
picCard5Eleven.Visible = True
End If
If lblCard1.Text = "12" Then
picCard1Queen.Visible = True
End If
If lblCard2.Text = "12" Then
picCard2Queen.Visible = True
End If
If lblCard3.Text = "12" Then
picCard3Queen.Visible = True
End If
If lblCard4.Text = "12" Then
picCard4Queen.Visible = True
End If
If lblCard5.Text = "12" Then
picCard5Queen.Visible = True
End If
If lblCard1.Text = "13" Then
picCard1King.Visible = True
End If
If lblCard2.Text = "13" Then
picCard2King.Visible = True
End If
If lblCard3.Text = "13" Then
picCard3King.Visible = True
End If
If lblCard4.Text = "13" Then
picCard4King.Visible = True
End If
If lblCard5.Text = "13" Then
picCard5King.Visible = True
End If
If lblComputerCard1.Text = "1" Then
picComCard1Ace.Visible = True
End If
If lblComputerCard2.Text = "1" Then
picComCard2Ace.Visible = True
End If
If lblComputerCard3.Text = "1" Then
picComCard3Ace.Visible = True
End If
If lblComputerCard1.Text = "2" Then
picComCard1Two.Visible = True
End If
If lblComputerCard2.Text = "2" Then
picComCard2Two.Visible = True
End If
If lblComputerCard3.Text = "2" Then
picComCard3Two.Visible = True
End If
If lblComputerCard1.Text = "3" Then
picComCard1Three.Visible = True
End If
If lblComputerCard2.Text = "3" Then
picComCard2Three.Visible = True
End If
If lblComputerCard3.Text = "3" Then
picComCard3Three.Visible = True
End If
If lblComputerCard1.Text = "4" Then
picComCard1Four.Visible = True
End If
If lblComputerCard2.Text = "4" Then
picComCard2Four.Visible = True
End If
If lblComputerCard3.Text = "4" Then
picComCard3Four.Visible = True
End If
If lblComputerCard1.Text = "5" Then
picComCard1Five.Visible = True
End If
If lblComputerCard2.Text = "5" Then
picComCard2Five.Visible = True
End If
If lblComputerCard3.Text = "5" Then
picComCard3Five.Visible = True
End If
If lblComputerCard1.Text = "6" Then
picComCard1Six.Visible = True
End If
If lblComputerCard2.Text = "6" Then
picComCard2Six.Visible = True
End If
If lblComputerCard3.Text = "6" Then
picComCard3Six.Visible = True
End If
If lblComputerCard1.Text = "7" Then
picComCard1Seven.Visible = True
End If
If lblComputerCard2.Text = "7" Then
picComCard2Seven.Visible = True
End If
If lblComputerCard3.Text = "7" Then
picComCard3Seven.Visible = True
End If
If lblComputerCard1.Text = "8" Then
piComCard1Eight.Visible = True
End If
If lblComputerCard2.Text = "8" Then
piComCard2Eight.Visible = True
End If
If lblComputerCard3.Text = "8" Then
piComCard3Eight.Visible = True
End If
If lblComputerCard1.Text = "9" Then
picComCard1Nine.Visible = True
End If
If lblComputerCard2.Text = "9" Then
picComCard2Nine.Visible = True
End If
If lblComputerCard3.Text = "9" Then
picComCard3Nine.Visible = True
End If
If lblComputerCard1.Text = "10" Then
picComCard1Ten.Visible = True
End If
If lblComputerCard2.Text = "10" Then
picComCard2Ten.Visible = True
End If
If lblComputerCard3.Text = "10" Then
picComCard3Ten.Visible = True
End If
If lblComputerCard1.Text = "11" Then
picComCard1Eleven.Visible = True
End If
If lblComputerCard2.Text = "11" Then
picComCard2Eleven.Visible = True
End If
If lblComputerCard3.Text = "11" Then
picComCard3Eleven.Visible = True
End If
If lblComputerCard1.Text = "12" Then
picComCard1Queen.Visible = True
End If
If lblComputerCard2.Text = "12" Then
picComCard2Queen.Visible = True
End If
If lblComputerCard3.Text = "12" Then
picComCard3Queen.Visible = True
End If
If lblComputerCard1.Text = "13" Then
picComCard1King.Visible = True
End If
If lblComputerCard2.Text = "13" Then
picComCard2King.Visible = True
End If
If lblComputerCard3.Text = "13" Then
picComCard3King.Visible = True
End If
End Sub
Private Sub btnPlayAgain_Click(sender As Object, e As EventArgs) Handles btnPlayAgain.Click
Dim ComputerCard1 As Integer
Dim ComputerCard2 As Integer
Dim ComputerCard3 As Integer
lblComputerCard1.Visible = False
lblComputerCard2.Visible = False
lblComputerCard3.Visible = False
lblComputerCard1.Text = ""
lblComputerCard2.Text = ""
lblComputerCard3.Text = ""
lblCard1.Visible = False
lblCard2.Visible = False
lblCard3.Visible = False
lblCard4.Visible = False
lblCard5.Visible = False
lblCard1.Text = ""
lblCard2.Text = ""
lblCard3.Text = ""
lblCard4.Text = ""
lblCard5.Text = ""
Counter = 0
ComputerCard1 = (10 * Rnd() + 1)
ComputerCard2 = (10 * Rnd() + 1)
ComputerCard3 = (10 * Rnd() + 1)
lblComputerCard1.Text = ComputerCard1
lblComputerCard2.Text = ComputerCard2
lblComputerCard3.Text = ComputerCard3
btnDrawCard.Enabled = True
btnCheckScore.Enabled = True
lblComputerTotal.Text = ""
lblPLayerScore.Text = ""
lblComputerTotal.Visible = False
lblPLayerScore.Visible = False
lblComputerScore.Visible = False
lblYourScore.Visible = False
picCard1Ace.Visible = False
picCard2Ace.Visible = False
picCard3Ace.Visible = False
picCard4Ace.Visible = False
picCard5Ace.Visible = False
picCard1Two.Visible = False
picCard2Two.Visible = False
picCard3Two.Visible = False
picCard4Two.Visible = False
picCard5Two.Visible = False
picCard1Three.Visible = False
picCard2Three.Visible = False
picCard3Three.Visible = False
picCard4Three.Visible = False
picCard5Three.Visible = False
picCard1Four.Visible = False
picCard2Four.Visible = False
picCard3Four.Visible = False
picCard4Four.Visible = False
picCard5Four.Visible = False
picCard1Five.Visible = False
picCard2Five.Visible = False
picCard3Five.Visible = False
picCard4Five.Visible = False
picCard5Five.Visible = False
picCard1Six.Visible = False
picCard2Six.Visible = False
picCard3Six.Visible = False
picCard4Six.Visible = False
picCard5Six.Visible = False
picCard1Seven.Visible = False
picCard2Seven.Visible = False
picCard3Seven.Visible = False
picCard4Seven.Visible = False
picCard5Seven.Visible = False
picCard1Eight.Visible = False
picCard2Eight.Visible = False
picCard3Eight.Visible = False
picCard4Eight.Visible = False
picCard5Eight.Visible = False
picCard1Nine.Visible = False
picCard2Nine.Visible = False
picCard3Nine.Visible = False
picCard4Nine.Visible = False
picCard5Nine.Visible = False
picCard1Ten.Visible = False
picCard2Ten.Visible = False
picCard3Ten.Visible = False
picCard4Ten.Visible = False
picCard5Ten.Visible = False
picCard1Queen.Visible = False
picCard2Queen.Visible = False
picCard3Queen.Visible = False
picCard4Queen.Visible = False
picCard5Queen.Visible = False
picCard1King.Visible = False
picCard2King.Visible = False
picCard3King.Visible = False
picCard4King.Visible = False
picCard5King.Visible = False
picComCard1Ace.Visible = False
picComCard2Ace.Visible = False
picComCard3Ace.Visible = False
picComCard1Two.Visible = False
picComCard2Two.Visible = False
picComCard3Two.Visible = False
picComCard1Three.Visible = False
picComCard2Three.Visible = False
picComCard3Three.Visible = False
picComCard1Four.Visible = False
picComCard2Four.Visible = False
picComCard3Four.Visible = False
picComCard1Five.Visible = False
picComCard2Five.Visible = False
picComCard3Five.Visible = False
picComCard1Six.Visible = False
picComCard2Six.Visible = False
picComCard3Six.Visible = False
picComCard1Seven.Visible = False
picComCard2Seven.Visible = False
picComCard3Seven.Visible = False
piComCard1Eight.Visible = False
piComCard2Eight.Visible = False
piComCard3Eight.Visible = False
picComCard1Nine.Visible = False
picComCard2Nine.Visible = False
picComCard3Nine.Visible = False
picComCard1Ten.Visible = False
picComCard2Ten.Visible = False
picComCard3Ten.Visible = False
picComCard1Eleven.Visible = False
picComCard2Eleven.Visible = False
picComCard3Eleven.Visible = False
picComCard1Queen.Visible = False
picComCard2Queen.Visible = False
picComCard3Queen.Visible = False
picComCard1King.Visible = False
picComCard2King.Visible = False
picComCard3King.Visible = False
btnCheckScore.Enabled = False
End Sub
Private Sub btnQuit_Click(sender As Object, e As EventArgs) Handles btnQuit.Click
Me.Close()
End Sub
Private Sub StartGameToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles StartGameToolStripMenuItem.Click
btnDrawCard.PerformClick()
End Sub
Private Sub QuitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles QuitToolStripMenuItem.Click
Me.Close()
End Sub
End Class
以下是问题的一些图片: