📄 frmactionslot.frm
字号:
Object.Tag = "2"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":D6A2E
Key = ""
Object.Tag = "3"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":D8624
Key = ""
Object.Tag = "4"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":DA076
Key = ""
Object.Tag = "5"
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":DBA90
Key = ""
Object.Tag = "6"
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":DD686
Key = ""
Object.Tag = "8"
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":DF098
Key = ""
Object.Tag = "1"
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":E0C06
Key = ""
Object.Tag = "2"
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":E2658
Key = ""
Object.Tag = "3"
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":E424E
Key = ""
Object.Tag = "4"
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":E5CA0
Key = ""
Object.Tag = "5"
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":E76BA
Key = ""
Object.Tag = "6"
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":E92B0
Key = ""
Object.Tag = "1"
EndProperty
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":EAE1E
Key = ""
Object.Tag = "2"
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":EC870
Key = ""
Object.Tag = "3"
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":EE466
Key = ""
Object.Tag = "4"
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":EFEB8
Key = ""
Object.Tag = "5"
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":F18D2
Key = ""
Object.Tag = "1"
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":F3440
Key = ""
Object.Tag = "2"
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":F4E92
Key = ""
Object.Tag = "3"
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":F6A88
Key = ""
Object.Tag = "4"
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":F84DA
Key = ""
Object.Tag = "1"
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":FA048
Key = ""
Object.Tag = "2"
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":FBA9A
Key = ""
Object.Tag = "3"
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":FD690
Key = ""
Object.Tag = "1"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmActionSlot.frx":FF1FE
Key = ""
Object.Tag = "2"
EndProperty
EndProperty
End
Begin VB.Image Image13
Height = 675
Left = 1500
Top = 6120
Width = 615
End
Begin VB.Image Image12
Height = 630
Left = 1500
Picture = "frmActionSlot.frx":100C50
Top = 6120
Width = 615
End
Begin VB.Image Image11
Height = 525
Left = 2310
Picture = "frmActionSlot.frx":1017CC
Top = 5940
Visible = 0 'False
Width = 825
End
Begin VB.Image Image10
Height = 525
Left = 2310
Picture = "frmActionSlot.frx":1023B8
Top = 5940
Width = 825
End
Begin VB.Image Image9
Height = 525
Left = 3180
Picture = "frmActionSlot.frx":102FA4
Top = 5940
Visible = 0 'False
Width = 855
End
Begin VB.Image Image8
Height = 525
Left = 3180
Picture = "frmActionSlot.frx":103C1C
Top = 5940
Width = 855
End
Begin VB.Image Image7
Height = 720
Left = 7020
Picture = "frmActionSlot.frx":104894
Top = 5910
Visible = 0 'False
Width = 930
End
Begin VB.Image Image6
Height = 720
Left = 7020
Picture = "frmActionSlot.frx":1058D8
Top = 5910
Width = 930
End
Begin VB.Image Image5
Height = 525
Left = 6090
Picture = "frmActionSlot.frx":10691C
Top = 5940
Visible = 0 'False
Width = 855
End
Begin VB.Image Image4
Height = 525
Left = 6090
Picture = "frmActionSlot.frx":107594
Top = 5940
Width = 855
End
Begin VB.Image Image3
Height = 2490
Left = 7350
Picture = "frmActionSlot.frx":10820C
Top = 2010
Visible = 0 'False
Width = 1155
End
Begin VB.Image Image2
Height = 2490
Left = 7350
Picture = "frmActionSlot.frx":10B8B8
Top = 2010
Visible = 0 'False
Width = 1155
End
Begin VB.Image Image1
Height = 2490
Left = 7350
Picture = "frmActionSlot.frx":10EF94
Top = 2010
Width = 1155
End
Begin VB.Image imgImage
Height = 1335
Index = 3
Left = 5580
Picture = "frmActionSlot.frx":11266C
Stretch = -1 'True
Top = 3600
Width = 1035
End
Begin VB.Image imgImage
Height = 1335
Index = 2
Left = 4470
Picture = "frmActionSlot.frx":11406E
Stretch = -1 'True
Top = 3600
Width = 1035
End
Begin VB.Image imgImage
Height = 1335
Index = 1
Left = 3390
Picture = "frmActionSlot.frx":115A70
Stretch = -1 'True
Top = 3600
Width = 1035
End
End
Attribute VB_Name = "frmActionSlot"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' +棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗+
' | TYPE : Program / game |
' | NAME : ActionSlot |
' | DESCRIPTION : A slot machine just for fun |
' | Modified code from Pamela Rai |
' | CREATED : 2003-02-19 |
' | PROGRAMMER : Martin Idman |
' | THANKS TO : Pamela Rai for original idea, |
' | some code and all pictures. :) |
' +棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗棗+
' Force variable declaration
Option Explicit
Dim ByThis As Integer
Dim intSetWinnings As Integer
Dim AmtWin As Integer
' Sub to set beginning pictures and tags
Private Sub Form_Load()
AmtWin = 100
' Dimension variables
Dim intFormLoad As Integer
Dim intRandom(3) As Integer
For intFormLoad = 1 To 1
' Set new random seed
Randomize
' Set random number from imagelist imagecount
intRandom(intFormLoad) = Int(Rnd * (imlImages(intFormLoad).ListImages.Count - 2)) + 1
' Set image row 1 picture and tag
imgImage(intFormLoad).Picture = imlImages(intFormLoad).ListImages(intRandom(intFormLoad)).Picture
imgImage(intFormLoad).Tag = intRandom(intFormLoad)
' Next intFormLoad
' Set winnings pictures
' For intFormLoad = 1 To 8
' imgWinnings(intFormLoad).Picture = imlImages(1).ListImages(intFormLoad).ExtractIcon
Next intFormLoad
' imgWinnings(9).Picture = imlImages(1).ListImages(6).ExtractIcon
'imgWinnings(10).Picture = imlImages(1).ListImages(1).ExtractIcon
' Set winning values
intWinnings(0) = 100 ' Add to jackpot value when '$ bonus' occurs on played line
intWinnings(1) = 25 ' Limon * 3
intWinnings(2) = 50 ' Cherry * 3
intWinnings(3) = 100 ' Lime * 3
intWinnings(4) = 200 ' Bar1 * 3
intWinnings(5) = 250 ' Bar2 * 3
intWinnings(6) = 300 ' Bar3 * 3
intWinnings(7) = 5 ' $
intWinnings(8) = 500 ' $$$
intWinnings(9) = 10 ' ' $$
intWinnings(10) = 1 'Bonus
' Show winning values
'SetWinnings 1
End Sub
' Sub to handle spinning
Private Sub SpinWheels()
' Dimension variables
Dim intSpinWheels As Integer
Dim intWheel As Integer
Dim lngWait As Long
Dim intSpin(3) As Integer
' Set random values to spin
Randomize: intSpin(1) = Int(Rnd * 40) + 20
Randomize: intSpin(2) = Int(Rnd * 40) + 20
Randomize: intSpin(3) = Int(Rnd * 40) + 20
' Get max spin value
intSpin(0) = IIf(intSpin(1) > intSpin(2) And intSpin(1) > intSpin(3), intSpin(1), IIf(intSpin(2) > intSpin(1) And intSpin(2) > intSpin(3), intSpin(2), intSpin(3)))
' Set wait time while spinning
lngWait = 10
' Set image variables from tag
intImage(1) = imgImage(1).Tag
' intImage(2) = imgImage(2).Tag
' intImage(3) = imgImage(3).Tag
' Loop spin times
For intSpinWheels = 1 To intSpin(0)
' Loop wheels
For intWheel = 1 To 3
' Add image counters
intImage(intWheel) = intImage(intWheel) + 1
' Check for out of bounds in imagelist
If intImage(intWheel) > imlImages(intWheel).ListImages.Count Then intImage(intWheel) = 1
' Check if stopped
If intSpin(intWheel) > intSpinWheels Then 'And chkHold(intWheel).Value <> vbChecked Then
' Set new image and tag on row 1
imgImage(intWheel).Picture = imlImages(intWheel).ListImages(intImage(intWheel)).Picture
imgImage(intWheel).Tag = intImage(intWheel)
End If
' End loop wheels
Next intWheel
' Wait while spinning
Sleep lngWait
' Add to wait counter to slow down
lngWait = lngWait + 1
' End loop spin
Next intSpinWheels
End Sub
' Function to check result and return earnings
Private Function CheckResult() As Long
' Dimension variables
Dim intCheckResult As Integer
Dim intBlink As Integer
Dim intEarnings As Integer
Dim intValue(5) As Integer
' Make values from imagelist tags (1-8 depending on picture)
intValue(3) = imlImages(1).ListImages(Val(imgImage(1).Tag)).Tag * 100 + _
imlImages(2).ListImages(Val(imgImage(2).Tag)).Tag * 10 + _
imlImages(3).ListImages(Val(imgImage(3).Tag)).Tag
' Check if something is won
' Select Case intValue(intCheckResult)
Select Case intValue(3)
Case 111 ' Limon * 3
intEarnings = intEarnings + (intWinnings(1) * ByThis)
Case 222 ' Cherry * 3
intEarnings = intEarnings + (intWinnings(2) * ByThis)
Case 333 ' Lime * 3
intEarnings = intEarnings + (intWinnings(3) * ByThis)
Case 444 ' Bar1 * 3
intEarnings = intEarnings + (intWinnings(4) * ByThis)
Case 555 ' Bar2 * 3
intEarnings = intEarnings + (intWinnings(5) * ByThis)
Case 666 ' Bar3 * 3
intEarnings = intEarnings + (intWinnings(6) * ByThis)
Case 188, 881, 818, 288, 828, 882, 388, 838, 883, 488, 848, 884, 588, 858, 885, 688, 868, 886, 788, 878, 887 ' $$
intEarnings = intEarnings + (intWinnings(9) * ByThis)
Case 888 ' $ Bonus * 3
intEarnings = intEarnings + (intWinnings(8) * ByThis)
Case 811, 812, 813, 814, 815, 816, 817, 821, 831, 841, 851, 861, 871
intEarnings = intEarnings + (intWinnings(7) * ByThis)
Case 181, 182, 183, 184, 185, 186, 187, 281, 381, 481, 581, 681, 781
intEarnings = intEarnings + (intWinnings(7) * ByThis)
Case 118, 128, 138, 148, 158, 168, 178, 218, 318, 418, 518, 618, 718
intEarnings = intEarnings + (intWinnings(7) * ByThis)
Case 822, 823, 824, 825, 826, 827, 832, 842, 852, 862, 872
intEarnings = intEarnings + (intWinnings(7) * ByThis)
Case 282, 283, 284, 285, 286, 287, 382, 482, 582, 682, 782
intEarnings = intEarnings + (intWinnings(7) * ByThis)
Case 228, 238, 248, 258, 268, 278, 328, 428, 528, 628, 728
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -