哪位能解释下这段vb代码 谢了 初学者

来源:百度知道 编辑:UC知道 时间:2024/06/18 06:39:37
21点游戏部分代码
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Cards(51), I, J As Integer
Private isDrag As Boolean
Private StartX, StartY As Single

Private Point1, Point2 As Single
Private Pos1, Pos2 As Integer
Private count1, count2
Private canJudgeWin As Boolean

Private Sub cmdSub_Click(Index As Integer)
Select Case Index
Case 0
Reset 3500, 2500
Case 1
Shuffle
Case 2
Deal 5000, 4800
Case 3
End
End Select
End Sub

Private Sub Init()
Pos1 = 10000
Pos2 = -900

count1 = 0
count2 = 0

Cmd_Deal1.Enabled = True
Cmd_Deal2.Enabled = True

canJudgeWin = False

Lbl_Point1.Caption = ""
Lbl_Point2.Caption = ""
Lbl_Win.Ca

Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Cards(51), I, J As Integer
Private isDrag As Boolean
Private StartX, StartY As Single

Private Point1, Point2 As Single
Private Pos1, Pos2 As Integer
Private count1, count2
Private canJudgeWin As Boolean

以上为声明

========================================================

Private Sub cmdSub_Click(Index As Integer)
Select Case Index
Case 0
Reset 3500, 2500
Case 1
Shuffle
Case 2
Deal 5000, 4800
Case 3
End
End Select
End Sub
好像是一个名为cmdSub 的 ComboBox控件的命令。 控件中有4项 文字!选择第一个执行 Reset 3500, 2500, 选择2执行 Shuffle , 选择3执行 Deal 5000, 4800 , 选择4 关闭程序

===============================================================

Private Sub Init()
Pos1 = 10000
Pos2