📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5175
ClientLeft = 60
ClientTop = 450
ClientWidth = 8220
LinkTopic = "Form1"
ScaleHeight = 5175
ScaleWidth = 8220
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "发牌"
Height = 495
Left = 5520
TabIndex = 0
Top = 120
Width = 2175
End
Begin VB.Label Label1
Caption = "J+扑克发牌小程序"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1440
TabIndex = 1
Top = 240
Width = 3015
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Riffle(ArrItems() As Integer)
Dim i As Long
Dim j As Long
Dim nLo As Integer
Dim nHi As Integer
Dim n As Integer
nLo = LBound(ArrItems)
nHi = UBound(ArrItems)
Randomize
For i = nLo To nHi
j = Rnd * (nHi - nLo) + nLo
n = ArrItems(i)
ArrItems(i) = ArrItems(j)
ArrItems(j) = n
Next
End Sub
Private Sub PrintItems(ArrItems() As Integer)
Dim i As Integer
Debug.Print String$(40, "-")
For i = LBound(ArrItems) To UBound(ArrItems)
Debug.Print ArrItems(i)
Next
Debug.Print String$(40, "-")
End Sub
Private Sub Command1_Click()
Dim ArrItems(107) As Integer
Dim i As Integer
For i = LBound(ArrItems) To UBound(ArrItems)
ArrItems(i) = i
Next
PrintItems ArrItems()
Riffle ArrItems
PrintItems ArrItems()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -