home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / yahtze1a / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-27  |  62.7 KB  |  1,782 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form frmMain 
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Yahtzee Deluxe"
  7.    ClientHeight    =   4860
  8.    ClientLeft      =   5565
  9.    ClientTop       =   2760
  10.    ClientWidth     =   4800
  11.    BeginProperty Font 
  12.       Name            =   "MS Sans Serif"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   700
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H00C0C0C0&
  21.    Icon            =   "frmMain.frx":0000
  22.    KeyPreview      =   -1  'True
  23.    LinkTopic       =   "Form1"
  24.    LockControls    =   -1  'True
  25.    MaxButton       =   0   'False
  26.    ScaleHeight     =   4860
  27.    ScaleWidth      =   4800
  28.    Begin VB.Frame Frame 
  29.       BackColor       =   &H00C0C0C0&
  30.       Height          =   400
  31.       Index           =   4
  32.       Left            =   2160
  33.       TabIndex        =   49
  34.       Top             =   4115
  35.       Width           =   2535
  36.       Begin VB.Label lblScores 
  37.          AutoSize        =   -1  'True
  38.          BackColor       =   &H00C0C0C0&
  39.          BackStyle       =   0  'Transparent
  40.          Caption         =   "Bonus Yahtzee"
  41.          BeginProperty Font 
  42.             Name            =   "MS Sans Serif"
  43.             Size            =   9.75
  44.             Charset         =   0
  45.             Weight          =   700
  46.             Underline       =   0   'False
  47.             Italic          =   0   'False
  48.             Strikethrough   =   0   'False
  49.          EndProperty
  50.          ForeColor       =   &H00800080&
  51.          Height          =   240
  52.          Index           =   13
  53.          Left            =   120
  54.          TabIndex        =   51
  55.          Top             =   130
  56.          Width           =   1920
  57.       End
  58.       Begin VB.Label lblNums 
  59.          AutoSize        =   -1  'True
  60.          BackColor       =   &H00C0C0C0&
  61.          BackStyle       =   0  'Transparent
  62.          Caption         =   "X"
  63.          BeginProperty Font 
  64.             Name            =   "MS Sans Serif"
  65.             Size            =   9.75
  66.             Charset         =   0
  67.             Weight          =   700
  68.             Underline       =   0   'False
  69.             Italic          =   0   'False
  70.             Strikethrough   =   0   'False
  71.          EndProperty
  72.          ForeColor       =   &H00800080&
  73.          Height          =   240
  74.          Index           =   13
  75.          Left            =   2055
  76.          TabIndex        =   50
  77.          Top             =   130
  78.          Width           =   150
  79.       End
  80.    End
  81.    Begin VB.Frame Frame 
  82.       BackColor       =   &H00C0C0C0&
  83.       BeginProperty Font 
  84.          Name            =   "MS Sans Serif"
  85.          Size            =   8.25
  86.          Charset         =   0
  87.          Weight          =   400
  88.          Underline       =   0   'False
  89.          Italic          =   0   'False
  90.          Strikethrough   =   0   'False
  91.       EndProperty
  92.       Height          =   570
  93.       Index           =   1
  94.       Left            =   120
  95.       TabIndex        =   8
  96.       Top             =   1200
  97.       Width           =   3255
  98.       Begin MSComctlLib.ProgressBar pBar 
  99.          Height          =   225
  100.          Left            =   75
  101.          TabIndex        =   52
  102.          Top             =   210
  103.          Width           =   2265
  104.          _ExtentX        =   3995
  105.          _ExtentY        =   397
  106.          _Version        =   393216
  107.          Appearance      =   1
  108.          Max             =   13
  109.          Scrolling       =   1
  110.       End
  111.       Begin VB.Label lblRollNumber 
  112.          AutoSize        =   -1  'True
  113.          BackColor       =   &H00C0C0C0&
  114.          BackStyle       =   0  'Transparent
  115.          Caption         =   "0"
  116.          Height          =   195
  117.          Left            =   2970
  118.          TabIndex        =   48
  119.          Top             =   225
  120.          Width           =   120
  121.       End
  122.       Begin VB.Label lblStatic 
  123.          AutoSize        =   -1  'True
  124.          BackColor       =   &H00C0C0C0&
  125.          BackStyle       =   0  'Transparent
  126.          Caption         =   "Roll #"
  127.          ForeColor       =   &H00C00000&
  128.          Height          =   195
  129.          Index           =   0
  130.          Left            =   2400
  131.          TabIndex        =   25
  132.          Top             =   225
  133.          Width           =   525
  134.       End
  135.    End
  136.    Begin VB.Frame Frame 
  137.       BackColor       =   &H00C0C0C0&
  138.       BeginProperty Font 
  139.          Name            =   "MS Sans Serif"
  140.          Size            =   8.25
  141.          Charset         =   0
  142.          Weight          =   400
  143.          Underline       =   0   'False
  144.          Italic          =   0   'False
  145.          Strikethrough   =   0   'False
  146.       EndProperty
  147.       Height          =   2295
  148.       Index           =   3
  149.       Left            =   2160
  150.       TabIndex        =   7
  151.       Top             =   1830
  152.       Width           =   2535
  153.       Begin VB.Label lblNums 
  154.          AutoSize        =   -1  'True
  155.          BackColor       =   &H00C0C0C0&
  156.          BackStyle       =   0  'Transparent
  157.          Caption         =   "X"
  158.          BeginProperty Font 
  159.             Name            =   "MS Sans Serif"
  160.             Size            =   9.75
  161.             Charset         =   0
  162.             Weight          =   700
  163.             Underline       =   0   'False
  164.             Italic          =   0   'False
  165.             Strikethrough   =   0   'False
  166.          EndProperty
  167.          ForeColor       =   &H00000000&
  168.          Height          =   240
  169.          Index           =   12
  170.          Left            =   2050
  171.          TabIndex        =   42
  172.          Top             =   2025
  173.          Width           =   150
  174.       End
  175.       Begin VB.Label lblNums 
  176.          AutoSize        =   -1  'True
  177.          BackColor       =   &H00C0C0C0&
  178.          BackStyle       =   0  'Transparent
  179.          Caption         =   "X"
  180.          BeginProperty Font 
  181.             Name            =   "MS Sans Serif"
  182.             Size            =   9.75
  183.             Charset         =   0
  184.             Weight          =   700
  185.             Underline       =   0   'False
  186.             Italic          =   0   'False
  187.             Strikethrough   =   0   'False
  188.          EndProperty
  189.          ForeColor       =   &H00000000&
  190.          Height          =   240
  191.          Index           =   11
  192.          Left            =   2050
  193.          TabIndex        =   41
  194.          Top             =   1710
  195.          Width           =   150
  196.       End
  197.       Begin VB.Label lblNums 
  198.          AutoSize        =   -1  'True
  199.          BackColor       =   &H00C0C0C0&
  200.          BackStyle       =   0  'Transparent
  201.          Caption         =   "X"
  202.          BeginProperty Font 
  203.             Name            =   "MS Sans Serif"
  204.             Size            =   9.75
  205.             Charset         =   0
  206.             Weight          =   700
  207.             Underline       =   0   'False
  208.             Italic          =   0   'False
  209.             Strikethrough   =   0   'False
  210.          EndProperty
  211.          ForeColor       =   &H00000000&
  212.          Height          =   240
  213.          Index           =   10
  214.          Left            =   2050
  215.          TabIndex        =   40
  216.          Top             =   1410
  217.          Width           =   150
  218.       End
  219.       Begin VB.Label lblNums 
  220.          AutoSize        =   -1  'True
  221.          BackColor       =   &H00C0C0C0&
  222.          BackStyle       =   0  'Transparent
  223.          Caption         =   "X"
  224.          BeginProperty Font 
  225.             Name            =   "MS Sans Serif"
  226.             Size            =   9.75
  227.             Charset         =   0
  228.             Weight          =   700
  229.             Underline       =   0   'False
  230.             Italic          =   0   'False
  231.             Strikethrough   =   0   'False
  232.          EndProperty
  233.          ForeColor       =   &H00000000&
  234.          Height          =   240
  235.          Index           =   9
  236.          Left            =   2050
  237.          TabIndex        =   39
  238.          Top             =   1095
  239.          Width           =   150
  240.       End
  241.       Begin VB.Label lblNums 
  242.          AutoSize        =   -1  'True
  243.          BackColor       =   &H00C0C0C0&
  244.          BackStyle       =   0  'Transparent
  245.          Caption         =   "X"
  246.          BeginProperty Font 
  247.             Name            =   "MS Sans Serif"
  248.             Size            =   9.75
  249.             Charset         =   0
  250.             Weight          =   700
  251.             Underline       =   0   'False
  252.             Italic          =   0   'False
  253.             Strikethrough   =   0   'False
  254.          EndProperty
  255.          ForeColor       =   &H00000000&
  256.          Height          =   240
  257.          Index           =   8
  258.          Left            =   2050
  259.          TabIndex        =   38
  260.          Top             =   780
  261.          Width           =   150
  262.       End
  263.       Begin VB.Label lblNums 
  264.          AutoSize        =   -1  'True
  265.          BackColor       =   &H00C0C0C0&
  266.          BackStyle       =   0  'Transparent
  267.          Caption         =   "X"
  268.          BeginProperty Font 
  269.             Name            =   "MS Sans Serif"
  270.             Size            =   9.75
  271.             Charset         =   0
  272.             Weight          =   700
  273.             Underline       =   0   'False
  274.             Italic          =   0   'False
  275.             Strikethrough   =   0   'False
  276.          EndProperty
  277.          ForeColor       =   &H00000000&
  278.          Height          =   240
  279.          Index           =   7
  280.          Left            =   2050
  281.          TabIndex        =   37
  282.          Top             =   480
  283.          Width           =   150
  284.       End
  285.       Begin VB.Label lblNums 
  286.          AutoSize        =   -1  'True
  287.          BackColor       =   &H00C0C0C0&
  288.          BackStyle       =   0  'Transparent
  289.          Caption         =   "X"
  290.          BeginProperty Font 
  291.             Name            =   "MS Sans Serif"
  292.             Size            =   9.75
  293.             Charset         =   0
  294.             Weight          =   700
  295.             Underline       =   0   'False
  296.             Italic          =   0   'False
  297.             Strikethrough   =   0   'False
  298.          EndProperty
  299.          ForeColor       =   &H00000000&
  300.          Height          =   240
  301.          Index           =   6
  302.          Left            =   2050
  303.          TabIndex        =   36
  304.          Top             =   165
  305.          Width           =   150
  306.       End
  307.       Begin VB.Label lblScores 
  308.          BackColor       =   &H00C0C0C0&
  309.          BackStyle       =   0  'Transparent
  310.          Caption         =   "Chance"
  311.          BeginProperty Font 
  312.             Name            =   "MS Sans Serif"
  313.             Size            =   9.75
  314.             Charset         =   0
  315.             Weight          =   700
  316.             Underline       =   0   'False
  317.             Italic          =   0   'False
  318.             Strikethrough   =   0   'False
  319.          EndProperty
  320.          Height          =   240
  321.          Index           =   12
  322.          Left            =   120
  323.          TabIndex        =   24
  324.          Top             =   2025
  325.          Width           =   1875
  326.       End
  327.       Begin VB.Label lblScores 
  328.          BackColor       =   &H00C0C0C0&
  329.          BackStyle       =   0  'Transparent
  330.          Caption         =   "Yahtzee"
  331.          BeginProperty Font 
  332.             Name            =   "MS Sans Serif"
  333.             Size            =   9.75
  334.             Charset         =   0
  335.             Weight          =   700
  336.             Underline       =   0   'False
  337.             Italic          =   0   'False
  338.             Strikethrough   =   0   'False
  339.          EndProperty
  340.          ForeColor       =   &H000000C0&
  341.          Height          =   240
  342.          Index           =   11
  343.          Left            =   120
  344.          TabIndex        =   23
  345.          Top             =   1725
  346.          Width           =   1935
  347.       End
  348.       Begin VB.Label lblScores 
  349.          BackColor       =   &H00C0C0C0&
  350.          BackStyle       =   0  'Transparent
  351.          Caption         =   "Large Straight"
  352.          BeginProperty Font 
  353.             Name            =   "MS Sans Serif"
  354.             Size            =   9.75
  355.             Charset         =   0
  356.             Weight          =   700
  357.             Underline       =   0   'False
  358.             Italic          =   0   'False
  359.             Strikethrough   =   0   'False
  360.          EndProperty
  361.          Height          =   240
  362.          Index           =   10
  363.          Left            =   120
  364.          TabIndex        =   22
  365.          Top             =   1410
  366.          Width           =   1755
  367.       End
  368.       Begin VB.Label lblScores 
  369.          BackColor       =   &H00C0C0C0&
  370.          BackStyle       =   0  'Transparent
  371.          Caption         =   "Small Straight"
  372.          BeginProperty Font 
  373.             Name            =   "MS Sans Serif"
  374.             Size            =   9.75
  375.             Charset         =   0
  376.             Weight          =   700
  377.             Underline       =   0   'False
  378.             Italic          =   0   'False
  379.             Strikethrough   =   0   'False
  380.          EndProperty
  381.          Height          =   240
  382.          Index           =   9
  383.          Left            =   120
  384.          TabIndex        =   21
  385.          Top             =   1095
  386.          Width           =   1935
  387.       End
  388.       Begin VB.Label lblScores 
  389.          BackColor       =   &H00C0C0C0&
  390.          BackStyle       =   0  'Transparent
  391.          Caption         =   "Full House"
  392.          BeginProperty Font 
  393.             Name            =   "MS Sans Serif"
  394.             Size            =   9.75
  395.             Charset         =   0
  396.             Weight          =   700
  397.             Underline       =   0   'False
  398.             Italic          =   0   'False
  399.             Strikethrough   =   0   'False
  400.          EndProperty
  401.          Height          =   240
  402.          Index           =   8
  403.          Left            =   120
  404.          TabIndex        =   20
  405.          Top             =   795
  406.          Width           =   1845
  407.       End
  408.       Begin VB.Label lblScores 
  409.          BackColor       =   &H00C0C0C0&
  410.          BackStyle       =   0  'Transparent
  411.          Caption         =   "4 of a kind"
  412.          BeginProperty Font 
  413.             Name            =   "MS Sans Serif"
  414.             Size            =   9.75
  415.             Charset         =   0
  416.             Weight          =   700
  417.             Underline       =   0   'False
  418.             Italic          =   0   'False
  419.             Strikethrough   =   0   'False
  420.          EndProperty
  421.          Height          =   240
  422.          Index           =   7
  423.          Left            =   120
  424.          TabIndex        =   19
  425.          Top             =   480
  426.          Width           =   1920
  427.       End
  428.       Begin VB.Label lblScores 
  429.          BackColor       =   &H00C0C0C0&
  430.          BackStyle       =   0  'Transparent
  431.          Caption         =   "3 of a kind"
  432.          BeginProperty Font 
  433.             Name            =   "MS Sans Serif"
  434.             Size            =   9.75
  435.             Charset         =   0
  436.             Weight          =   700
  437.             Underline       =   0   'False
  438.             Italic          =   0   'False
  439.             Strikethrough   =   0   'False
  440.          EndProperty
  441.          Height          =   240
  442.          Index           =   6
  443.          Left            =   120
  444.          TabIndex        =   18
  445.          Top             =   165
  446.          Width           =   1800
  447.       End
  448.    End
  449.    Begin VB.Frame Frame 
  450.       BackColor       =   &H00C0C0C0&
  451.       BeginProperty Font 
  452.          Name            =   "MS Sans Serif"
  453.          Size            =   8.25
  454.          Charset         =   0
  455.          Weight          =   400
  456.          Underline       =   0   'False
  457.          Italic          =   0   'False
  458.          Strikethrough   =   0   'False
  459.       EndProperty
  460.       Height          =   1050
  461.       Index           =   0
  462.       Left            =   120
  463.       TabIndex        =   6
  464.       Top             =   120
  465.       Width           =   4575
  466.       Begin MSComctlLib.ImageList ilDice 
  467.          Left            =   690
  468.          Top             =   465
  469.          _ExtentX        =   1005
  470.          _ExtentY        =   1005
  471.          BackColor       =   -2147483643
  472.          ImageWidth      =   32
  473.          ImageHeight     =   32
  474.          MaskColor       =   12632256
  475.          _Version        =   393216
  476.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  477.             NumListImages   =   6
  478.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "frmMain.frx":030A
  480.                Key             =   ""
  481.             EndProperty
  482.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "frmMain.frx":07EE
  484.                Key             =   ""
  485.             EndProperty
  486.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "frmMain.frx":0D02
  488.                Key             =   ""
  489.             EndProperty
  490.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "frmMain.frx":124E
  492.                Key             =   ""
  493.             EndProperty
  494.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "frmMain.frx":17CE
  496.                Key             =   ""
  497.             EndProperty
  498.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "frmMain.frx":1DB6
  500.                Key             =   ""
  501.             EndProperty
  502.          EndProperty
  503.       End
  504.       Begin MSComctlLib.ImageList ImageList1 
  505.          Left            =   1530
  506.          Top             =   465
  507.          _ExtentX        =   1005
  508.          _ExtentY        =   1005
  509.          BackColor       =   -2147483643
  510.          ImageWidth      =   73
  511.          ImageHeight     =   22
  512.          MaskColor       =   12632256
  513.          _Version        =   393216
  514.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  515.             NumListImages   =   7
  516.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  517.                Picture         =   "frmMain.frx":23A2
  518.                Key             =   ""
  519.             EndProperty
  520.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  521.                Picture         =   "frmMain.frx":2726
  522.                Key             =   ""
  523.             EndProperty
  524.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  525.                Picture         =   "frmMain.frx":2AA2
  526.                Key             =   ""
  527.             EndProperty
  528.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  529.                Picture         =   "frmMain.frx":2D32
  530.                Key             =   ""
  531.             EndProperty
  532.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  533.                Picture         =   "frmMain.frx":2FE6
  534.                Key             =   ""
  535.             EndProperty
  536.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  537.                Picture         =   "frmMain.frx":32E6
  538.                Key             =   ""
  539.             EndProperty
  540.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  541.                Picture         =   "frmMain.frx":35FE
  542.                Key             =   ""
  543.             EndProperty
  544.          EndProperty
  545.       End
  546.       Begin VB.CheckBox chkDice 
  547.          BackColor       =   &H00C0C0C0&
  548.          BeginProperty Font 
  549.             Name            =   "MS Sans Serif"
  550.             Size            =   8.25
  551.             Charset         =   0
  552.             Weight          =   400
  553.             Underline       =   0   'False
  554.             Italic          =   0   'False
  555.             Strikethrough   =   0   'False
  556.          EndProperty
  557.          Height          =   255
  558.          Index           =   4
  559.          Left            =   4000
  560.          TabIndex        =   4
  561.          TabStop         =   0   'False
  562.          Top             =   720
  563.          Width           =   195
  564.       End
  565.       Begin VB.CheckBox chkDice 
  566.          BackColor       =   &H00C0C0C0&
  567.          BeginProperty Font 
  568.             Name            =   "MS Sans Serif"
  569.             Size            =   8.25
  570.             Charset         =   0
  571.             Weight          =   400
  572.             Underline       =   0   'False
  573.             Italic          =   0   'False
  574.             Strikethrough   =   0   'False
  575.          EndProperty
  576.          Height          =   255
  577.          Index           =   3
  578.          Left            =   3090
  579.          TabIndex        =   3
  580.          TabStop         =   0   'False
  581.          Top             =   720
  582.          Width           =   195
  583.       End
  584.       Begin VB.CheckBox chkDice 
  585.          BackColor       =   &H00C0C0C0&
  586.          BeginProperty Font 
  587.             Name            =   "MS Sans Serif"
  588.             Size            =   8.25
  589.             Charset         =   0
  590.             Weight          =   400
  591.             Underline       =   0   'False
  592.             Italic          =   0   'False
  593.             Strikethrough   =   0   'False
  594.          EndProperty
  595.          Height          =   255
  596.          Index           =   2
  597.          Left            =   2180
  598.          TabIndex        =   2
  599.          TabStop         =   0   'False
  600.          Top             =   720
  601.          Width           =   195
  602.       End
  603.       Begin VB.CheckBox chkDice 
  604.          BackColor       =   &H00C0C0C0&
  605.          BeginProperty Font 
  606.             Name            =   "MS Sans Serif"
  607.             Size            =   8.25
  608.             Charset         =   0
  609.             Weight          =   400
  610.             Underline       =   0   'False
  611.             Italic          =   0   'False
  612.             Strikethrough   =   0   'False
  613.          EndProperty
  614.          Height          =   255
  615.          Index           =   1
  616.          Left            =   1270
  617.          TabIndex        =   1
  618.          TabStop         =   0   'False
  619.          Top             =   720
  620.          Width           =   195
  621.       End
  622.       Begin VB.CheckBox chkDice 
  623.          BackColor       =   &H00C0C0C0&
  624.          BeginProperty Font 
  625.             Name            =   "MS Sans Serif"
  626.             Size            =   8.25
  627.             Charset         =   0
  628.             Weight          =   400
  629.             Underline       =   0   'False
  630.             Italic          =   0   'False
  631.             Strikethrough   =   0   'False
  632.          EndProperty
  633.          Height          =   255
  634.          Index           =   0
  635.          Left            =   360
  636.          TabIndex        =   0
  637.          TabStop         =   0   'False
  638.          Top             =   720
  639.          Width           =   195
  640.       End
  641.       Begin VB.Label labClick 
  642.          BackStyle       =   0  'Transparent
  643.          Height          =   855
  644.          Index           =   4
  645.          Left            =   3800
  646.          TabIndex        =   47
  647.          Top             =   120
  648.          Width           =   615
  649.       End
  650.       Begin VB.Label labClick 
  651.          BackStyle       =   0  'Transparent
  652.          Height          =   855
  653.          Index           =   3
  654.          Left            =   2880
  655.          TabIndex        =   46
  656.          Top             =   120
  657.          Width           =   615
  658.       End
  659.       Begin VB.Label labClick 
  660.          BackStyle       =   0  'Transparent
  661.          Height          =   855
  662.          Index           =   2
  663.          Left            =   1950
  664.          TabIndex        =   45
  665.          Top             =   120
  666.          Width           =   615
  667.       End
  668.       Begin VB.Label labClick 
  669.          BackStyle       =   0  'Transparent
  670.          Height          =   855
  671.          Index           =   1
  672.          Left            =   1080
  673.          TabIndex        =   44
  674.          Top             =   120
  675.          Width           =   615
  676.       End
  677.       Begin VB.Label labClick 
  678.          BackStyle       =   0  'Transparent
  679.          Height          =   855
  680.          Index           =   0
  681.          Left            =   120
  682.          TabIndex        =   43
  683.          Top             =   120
  684.          Width           =   615
  685.       End
  686.       Begin VB.Image imgDice 
  687.          Height          =   495
  688.          Index           =   1
  689.          Left            =   1120
  690.          Top             =   190
  691.          Width           =   495
  692.       End
  693.       Begin VB.Image imgDice 
  694.          Height          =   495
  695.          Index           =   2
  696.          Left            =   2030
  697.          Top             =   190
  698.          Width           =   495
  699.       End
  700.       Begin VB.Image imgDice 
  701.          Height          =   495
  702.          Index           =   3
  703.          Left            =   2940
  704.          Top             =   190
  705.          Width           =   495
  706.       End
  707.       Begin VB.Image imgDice 
  708.          Height          =   495
  709.          Index           =   4
  710.          Left            =   3850
  711.          Top             =   195
  712.          Width           =   495
  713.       End
  714.       Begin VB.Image imgDice 
  715.          Height          =   495
  716.          Index           =   0
  717.          Left            =   210
  718.          Top             =   195
  719.          Width           =   495
  720.       End
  721.    End
  722.    Begin VB.Frame Frame 
  723.       BackColor       =   &H00C0C0C0&
  724.       BeginProperty Font 
  725.          Name            =   "MS Sans Serif"
  726.          Size            =   8.25
  727.          Charset         =   0
  728.          Weight          =   400
  729.          Underline       =   0   'False
  730.          Italic          =   0   'False
  731.          Strikethrough   =   0   'False
  732.       EndProperty
  733.       Height          =   2055
  734.       Index           =   2
  735.       Left            =   135
  736.       TabIndex        =   5
  737.       Top             =   1830
  738.       Width           =   1935
  739.       Begin VB.Label lblNums 
  740.          AutoSize        =   -1  'True
  741.          BackColor       =   &H00C0C0C0&
  742.          BackStyle       =   0  'Transparent
  743.          Caption         =   "X"
  744.          BeginProperty Font 
  745.             Name            =   "MS Sans Serif"
  746.             Size            =   9.75
  747.             Charset         =   0
  748.             Weight          =   700
  749.             Underline       =   0   'False
  750.             Italic          =   0   'False
  751.             Strikethrough   =   0   'False
  752.          EndProperty
  753.          ForeColor       =   &H00000000&
  754.          Height          =   240
  755.          Index           =   5
  756.          Left            =   1560
  757.          TabIndex        =   35
  758.          Top             =   1730
  759.          Width           =   150
  760.       End
  761.       Begin VB.Label lblNums 
  762.          AutoSize        =   -1  'True
  763.          BackColor       =   &H00C0C0C0&
  764.          BackStyle       =   0  'Transparent
  765.          Caption         =   "X"
  766.          BeginProperty Font 
  767.             Name            =   "MS Sans Serif"
  768.             Size            =   9.75
  769.             Charset         =   0
  770.             Weight          =   700
  771.             Underline       =   0   'False
  772.             Italic          =   0   'False
  773.             Strikethrough   =   0   'False
  774.          EndProperty
  775.          ForeColor       =   &H00000000&
  776.          Height          =   240
  777.          Index           =   4
  778.          Left            =   1560
  779.          TabIndex        =   34
  780.          Top             =   1416
  781.          Width           =   150
  782.       End
  783.       Begin VB.Label lblNums 
  784.          AutoSize        =   -1  'True
  785.          BackColor       =   &H00C0C0C0&
  786.          BackStyle       =   0  'Transparent
  787.          Caption         =   "X"
  788.          BeginProperty Font 
  789.             Name            =   "MS Sans Serif"
  790.             Size            =   9.75
  791.             Charset         =   0
  792.             Weight          =   700
  793.             Underline       =   0   'False
  794.             Italic          =   0   'False
  795.             Strikethrough   =   0   'False
  796.          EndProperty
  797.          ForeColor       =   &H00000000&
  798.          Height          =   240
  799.          Index           =   3
  800.          Left            =   1560
  801.          TabIndex        =   33
  802.          Top             =   1102
  803.          Width           =   150
  804.       End
  805.       Begin VB.Label lblNums 
  806.          AutoSize        =   -1  'True
  807.          BackColor       =   &H00C0C0C0&
  808.          BackStyle       =   0  'Transparent
  809.          Caption         =   "X"
  810.          BeginProperty Font 
  811.             Name            =   "MS Sans Serif"
  812.             Size            =   9.75
  813.             Charset         =   0
  814.             Weight          =   700
  815.             Underline       =   0   'False
  816.             Italic          =   0   'False
  817.             Strikethrough   =   0   'False
  818.          EndProperty
  819.          ForeColor       =   &H00000000&
  820.          Height          =   240
  821.          Index           =   2
  822.          Left            =   1560
  823.          TabIndex        =   32
  824.          Top             =   788
  825.          Width           =   150
  826.       End
  827.       Begin VB.Label lblNums 
  828.          AutoSize        =   -1  'True
  829.          BackColor       =   &H00C0C0C0&
  830.          BackStyle       =   0  'Transparent
  831.          Caption         =   "X"
  832.          BeginProperty Font 
  833.             Name            =   "MS Sans Serif"
  834.             Size            =   9.75
  835.             Charset         =   0
  836.             Weight          =   700
  837.             Underline       =   0   'False
  838.             Italic          =   0   'False
  839.             Strikethrough   =   0   'False
  840.          EndProperty
  841.          ForeColor       =   &H00000000&
  842.          Height          =   240
  843.          Index           =   1
  844.          Left            =   1560
  845.          TabIndex        =   27
  846.          Top             =   480
  847.          Width           =   150
  848.       End
  849.       Begin VB.Label lblNums 
  850.          AutoSize        =   -1  'True
  851.          BackColor       =   &H00C0C0C0&
  852.          BackStyle       =   0  'Transparent
  853.          Caption         =   "X"
  854.          BeginProperty Font 
  855.             Name            =   "MS Sans Serif"
  856.             Size            =   9.75
  857.             Charset         =   0
  858.             Weight          =   700
  859.             Underline       =   0   'False
  860.             Italic          =   0   'False
  861.             Strikethrough   =   0   'False
  862.          EndProperty
  863.          ForeColor       =   &H00000000&
  864.          Height          =   240
  865.          Index           =   0
  866.          Left            =   1560
  867.          TabIndex        =   26
  868.          Top             =   165
  869.          Width           =   150
  870.       End
  871.       Begin VB.Label lblScores 
  872.          BackColor       =   &H00C0C0C0&
  873.          BackStyle       =   0  'Transparent
  874.          Caption         =   "Six"
  875.          BeginProperty Font 
  876.             Name            =   "MS Sans Serif"
  877.             Size            =   9.75
  878.             Charset         =   0
  879.             Weight          =   700
  880.             Underline       =   0   'False
  881.             Italic          =   0   'False
  882.             Strikethrough   =   0   'False
  883.          EndProperty
  884.          Height          =   240
  885.          Index           =   5
  886.          Left            =   120
  887.          TabIndex        =   17
  888.          Top             =   1725
  889.          Width           =   1290
  890.       End
  891.       Begin VB.Label lblScores 
  892.          BackColor       =   &H00C0C0C0&
  893.          BackStyle       =   0  'Transparent
  894.          Caption         =   "Five"
  895.          BeginProperty Font 
  896.             Name            =   "MS Sans Serif"
  897.             Size            =   9.75
  898.             Charset         =   0
  899.             Weight          =   700
  900.             Underline       =   0   'False
  901.             Italic          =   0   'False
  902.             Strikethrough   =   0   'False
  903.          EndProperty
  904.          Height          =   240
  905.          Index           =   4
  906.          Left            =   120
  907.          TabIndex        =   16
  908.          Top             =   1410
  909.          Width           =   1425
  910.       End
  911.       Begin VB.Label lblScores 
  912.          BackColor       =   &H00C0C0C0&
  913.          BackStyle       =   0  'Transparent
  914.          Caption         =   "Four"
  915.          BeginProperty Font 
  916.             Name            =   "MS Sans Serif"
  917.             Size            =   9.75
  918.             Charset         =   0
  919.             Weight          =   700
  920.             Underline       =   0   'False
  921.             Italic          =   0   'False
  922.             Strikethrough   =   0   'False
  923.          EndProperty
  924.          Height          =   240
  925.          Index           =   3
  926.          Left            =   120
  927.          TabIndex        =   15
  928.          Top             =   1095
  929.          Width           =   1440
  930.       End
  931.       Begin VB.Label lblScores 
  932.          BackColor       =   &H00C0C0C0&
  933.          BackStyle       =   0  'Transparent
  934.          Caption         =   "Three"
  935.          BeginProperty Font 
  936.             Name            =   "MS Sans Serif"
  937.             Size            =   9.75
  938.             Charset         =   0
  939.             Weight          =   700
  940.             Underline       =   0   'False
  941.             Italic          =   0   'False
  942.             Strikethrough   =   0   'False
  943.          EndProperty
  944.          Height          =   240
  945.          Index           =   2
  946.          Left            =   120
  947.          TabIndex        =   14
  948.          Top             =   795
  949.          Width           =   1335
  950.       End
  951.       Begin VB.Label lblScores 
  952.          BackColor       =   &H00C0C0C0&
  953.          BackStyle       =   0  'Transparent
  954.          Caption         =   "Two"
  955.          BeginProperty Font 
  956.             Name            =   "MS Sans Serif"
  957.             Size            =   9.75
  958.             Charset         =   0
  959.             Weight          =   700
  960.             Underline       =   0   'False
  961.             Italic          =   0   'False
  962.             Strikethrough   =   0   'False
  963.          EndProperty
  964.          Height          =   240
  965.          Index           =   1
  966.          Left            =   120
  967.          TabIndex        =   13
  968.          Top             =   480
  969.          Width           =   1290
  970.       End
  971.       Begin VB.Label lblScores 
  972.          BackColor       =   &H00C0C0C0&
  973.          BackStyle       =   0  'Transparent
  974.          Caption         =   "Aces"
  975.          BeginProperty Font 
  976.             Name            =   "MS Sans Serif"
  977.             Size            =   9.75
  978.             Charset         =   0
  979.             Weight          =   700
  980.             Underline       =   0   'False
  981.             Italic          =   0   'False
  982.             Strikethrough   =   0   'False
  983.          EndProperty
  984.          Height          =   240
  985.          Index           =   0
  986.          Left            =   135
  987.          TabIndex        =   12
  988.          Top             =   180
  989.          Width           =   1260
  990.       End
  991.    End
  992.    Begin VB.Line Line1 
  993.       BorderColor     =   &H00808080&
  994.       Index           =   1
  995.       X1              =   0
  996.       X2              =   4800
  997.       Y1              =   30
  998.       Y2              =   30
  999.    End
  1000.    Begin VB.Image imgRoll 
  1001.       Height          =   330
  1002.       Left            =   3520
  1003.       Picture         =   "frmMain.frx":3A7E
  1004.       Top             =   1380
  1005.       Width           =   1095
  1006.    End
  1007.    Begin VB.Label lblGTotal 
  1008.       AutoSize        =   -1  'True
  1009.       BackColor       =   &H00C0C0C0&
  1010.       BackStyle       =   0  'Transparent
  1011.       Caption         =   "0"
  1012.       BeginProperty Font 
  1013.          Name            =   "MS Sans Serif"
  1014.          Size            =   9.75
  1015.          Charset         =   0
  1016.          Weight          =   700
  1017.          Underline       =   0   'False
  1018.          Italic          =   0   'False
  1019.          Strikethrough   =   0   'False
  1020.       EndProperty
  1021.       ForeColor       =   &H00000080&
  1022.       Height          =   240
  1023.       Left            =   4225
  1024.       TabIndex        =   31
  1025.       Top             =   4560
  1026.       Width           =   135
  1027.    End
  1028.    Begin VB.Label lblBonusCountDown 
  1029.       Alignment       =   2  'Center
  1030.       Appearance      =   0  'Flat
  1031.       AutoSize        =   -1  'True
  1032.       BackColor       =   &H00C0C0C0&
  1033.       BackStyle       =   0  'Transparent
  1034.       Caption         =   "-63"
  1035.       BeginProperty Font 
  1036.          Name            =   "MS Sans Serif"
  1037.          Size            =   9.75
  1038.          Charset         =   0
  1039.          Weight          =   700
  1040.          Underline       =   -1  'True
  1041.          Italic          =   0   'False
  1042.          Strikethrough   =   0   'False
  1043.       EndProperty
  1044.       ForeColor       =   &H00800080&
  1045.       Height          =   240
  1046.       Left            =   1005
  1047.       TabIndex        =   30
  1048.       Top             =   4560
  1049.       Width           =   330
  1050.    End
  1051.    Begin VB.Label lblLScoreTotal 
  1052.       AutoSize        =   -1  'True
  1053.       BackColor       =   &H00C0C0C0&
  1054.       BackStyle       =   0  'Transparent
  1055.       Caption         =   "0"
  1056.       BeginProperty Font 
  1057.          Name            =   "MS Sans Serif"
  1058.          Size            =   9.75
  1059.          Charset         =   0
  1060.          Weight          =   700
  1061.          Underline       =   0   'False
  1062.          Italic          =   0   'False
  1063.          Strikethrough   =   0   'False
  1064.       EndProperty
  1065.       ForeColor       =   &H00000000&
  1066.       Height          =   240
  1067.       Left            =   1680
  1068.       TabIndex        =   29
  1069.       Top             =   4200
  1070.       Width           =   135
  1071.    End
  1072.    Begin VB.Label lblScoreBonus 
  1073.       AutoSize        =   -1  'True
  1074.       BackColor       =   &H00C0C0C0&
  1075.       BackStyle       =   0  'Transparent
  1076.       Caption         =   "0"
  1077.       BeginProperty Font 
  1078.          Name            =   "MS Sans Serif"
  1079.          Size            =   9.75
  1080.          Charset         =   0
  1081.          Weight          =   700
  1082.          Underline       =   0   'False
  1083.          Italic          =   0   'False
  1084.          Strikethrough   =   0   'False
  1085.       EndProperty
  1086.       ForeColor       =   &H00000000&
  1087.       Height          =   240
  1088.       Left            =   1680
  1089.       TabIndex        =   28
  1090.       Top             =   4560
  1091.       Width           =   135
  1092.    End
  1093.    Begin VB.Label lblStatic 
  1094.       Appearance      =   0  'Flat
  1095.       AutoSize        =   -1  'True
  1096.       BackColor       =   &H00C0C0C0&
  1097.       BackStyle       =   0  'Transparent
  1098.       Caption         =   "Game Total"
  1099.       BeginProperty Font 
  1100.          Name            =   "MS Sans Serif"
  1101.          Size            =   9.75
  1102.          Charset         =   0
  1103.          Weight          =   700
  1104.          Underline       =   -1  'True
  1105.          Italic          =   0   'False
  1106.          Strikethrough   =   0   'False
  1107.       EndProperty
  1108.       ForeColor       =   &H00C00000&
  1109.       Height          =   240
  1110.       Index           =   3
  1111.       Left            =   2280
  1112.       TabIndex        =   11
  1113.       Top             =   4560
  1114.       Width           =   1230
  1115.    End
  1116.    Begin VB.Label lblStatic 
  1117.       Appearance      =   0  'Flat
  1118.       AutoSize        =   -1  'True
  1119.       BackColor       =   &H00C0C0C0&
  1120.       BackStyle       =   0  'Transparent
  1121.       Caption         =   "Bonus (     )"
  1122.       BeginProperty Font 
  1123.          Name            =   "MS Sans Serif"
  1124.          Size            =   9.75
  1125.          Charset         =   0
  1126.          Weight          =   700
  1127.          Underline       =   -1  'True
  1128.          Italic          =   0   'False
  1129.          Strikethrough   =   0   'False
  1130.       EndProperty
  1131.       ForeColor       =   &H00800080&
  1132.       Height          =   240
  1133.       Index           =   2
  1134.       Left            =   240
  1135.       TabIndex        =   10
  1136.       Top             =   4560
  1137.       Width           =   1170
  1138.    End
  1139.    Begin VB.Label lblStatic 
  1140.       Appearance      =   0  'Flat
  1141.       AutoSize        =   -1  'True
  1142.       BackColor       =   &H00C0C0C0&
  1143.       BackStyle       =   0  'Transparent
  1144.       Caption         =   "Total"
  1145.       BeginProperty Font 
  1146.          Name            =   "MS Sans Serif"
  1147.          Size            =   9.75
  1148.          Charset         =   0
  1149.          Weight          =   700
  1150.          Underline       =   -1  'True
  1151.          Italic          =   0   'False
  1152.          Strikethrough   =   0   'False
  1153.       EndProperty
  1154.       ForeColor       =   &H00C00000&
  1155.       Height          =   240
  1156.       Index           =   1
  1157.       Left            =   240
  1158.       TabIndex        =   9
  1159.       Top             =   4200
  1160.       Width           =   555
  1161.    End
  1162.    Begin VB.Line Line1 
  1163.       BorderColor     =   &H00E0E0E0&
  1164.       Index           =   0
  1165.       X1              =   0
  1166.       X2              =   4800
  1167.       Y1              =   45
  1168.       Y2              =   45
  1169.    End
  1170.    Begin VB.Menu mnuGameMain 
  1171.       Caption         =   "&Game"
  1172.       Begin VB.Menu mnuGame 
  1173.          Caption         =   "&New"
  1174.          Index           =   0
  1175.          Shortcut        =   {F2}
  1176.       End
  1177.       Begin VB.Menu mnuGame 
  1178.          Caption         =   "-"
  1179.          Index           =   1
  1180.       End
  1181.       Begin VB.Menu mnuGame 
  1182.          Caption         =   "&Undo Last"
  1183.          Index           =   2
  1184.          Shortcut        =   ^Z
  1185.       End
  1186.       Begin VB.Menu mnuGame 
  1187.          Caption         =   "-"
  1188.          Index           =   3
  1189.       End
  1190.       Begin VB.Menu mnuGame 
  1191.          Caption         =   "&Statistics"
  1192.          Index           =   4
  1193.          Shortcut        =   ^S
  1194.       End
  1195.       Begin VB.Menu mnuGame 
  1196.          Caption         =   "&High Score"
  1197.          Index           =   5
  1198.          Shortcut        =   ^H
  1199.       End
  1200.       Begin VB.Menu mnuGame 
  1201.          Caption         =   "-"
  1202.          Index           =   6
  1203.       End
  1204.       Begin VB.Menu mnuGame 
  1205.          Caption         =   "E&xit"
  1206.          Index           =   7
  1207.          Shortcut        =   ^X
  1208.       End
  1209.    End
  1210.    Begin VB.Menu mnuOptions 
  1211.       Caption         =   "&Options"
  1212.       Begin VB.Menu mnuSound 
  1213.          Caption         =   "&Sound"
  1214.          Checked         =   -1  'True
  1215.       End
  1216.    End
  1217.    Begin VB.Menu mnuHelpMain 
  1218.       Caption         =   "&Help"
  1219.       Begin VB.Menu mnuHelp 
  1220.          Caption         =   "Help &Contents"
  1221.          Index           =   0
  1222.          Shortcut        =   {F1}
  1223.       End
  1224.       Begin VB.Menu mnuHelp 
  1225.          Caption         =   "Help &Index"
  1226.          Index           =   1
  1227.       End
  1228.       Begin VB.Menu mnuHelp 
  1229.          Caption         =   "-"
  1230.          Index           =   2
  1231.       End
  1232.       Begin VB.Menu mnuHelp 
  1233.          Caption         =   "&About"
  1234.          Index           =   3
  1235.       End
  1236.    End
  1237. Attribute VB_Name = "frmMain"
  1238. Attribute VB_GlobalNameSpace = False
  1239. Attribute VB_Creatable = False
  1240. Attribute VB_PredeclaredId = True
  1241. Attribute VB_Exposed = False
  1242. '******************************************************************
  1243. '*  Name:    Yahtzee Deluxe (couldn't think of a better name)     *
  1244. '*  Author:  Shannon Harmon                                       *
  1245. '*  Email:   sharmon@microtechcomputers.com                       *
  1246. '*  Date:    March 3, 1999                                        *
  1247. '*  Updated: September 25, 1999                                   *
  1248. '*                                                                *
  1249. '*  Source Copyright - Shannon Harmon                             *
  1250. '*  Yahtzee is owned by Milton Bradley                            *
  1251. '*                                                                *
  1252. '*  Notice:  Made available only for personal (non commercial)    *
  1253. '*           use.  Do NOT try to sell this software, use only for *
  1254. '*           learning and ideas.  Source code made free available *
  1255. '*           to the public domain.  Please email me any updates   *
  1256. '*           you make and please keep this header with any source *
  1257. '*           you distribute.                                      *
  1258. '*                                                                *
  1259. '*  PS:  Help file class from http://www.vbexplorer.com           *
  1260. '*                                                                *
  1261. '******************************************************************
  1262. Option Explicit
  1263. Dim RollCount As Integer '//Track current round total rolls (max 3)
  1264. Dim die(4) As Integer '//Tracks dices number value
  1265. Dim uIndex As Integer '//Tracks last score clicked
  1266. Dim uGameTotal As Integer '//Tracks last total score before undo
  1267. Dim uBonus63 As Integer '//Tracks last bonus amount
  1268. Dim ulColTotal As Integer '//Tracks last left column total points
  1269. Dim uBonusCountDown As Integer '//Tracks last bonus countdown number
  1270. Dim uYatzeeBonus As Boolean '//Tracks if bonus yahtzee should test if undo mode
  1271. Dim uRollCount As Integer '//Tracks rollcount before undo
  1272. Private hHelp As New HTMLHelp '//Help class object
  1273. Private Sub Form_Load()
  1274.   Call CheckReg '//Check and setup registry
  1275.   Call NewGame '//Start new game
  1276. End Sub
  1277. Private Sub NewGame() '//Initialze new game
  1278. Dim i As Integer
  1279.   For i = 0 To 13 '//Disable and reset all scoreing buttons
  1280.     lblNums(i).Enabled = False
  1281.     lblNums(i) = "X"
  1282.     lblNums(i).FontStrikethru = False
  1283.     lblScores(i).Enabled = False
  1284.     lblScores(i).FontStrikethru = False
  1285.   Next i
  1286.   Bonus63 = 0 '//Reset score variables
  1287.   lColTotal = 0
  1288.   rColTotal = 0
  1289.   GameTotal = 0
  1290.   lblScoreBonus = "0" '//Left Column bonus score
  1291.   lblLScoreTotal = "0" '//Left Column Score total
  1292.   lblGTotal = "0" '//Game total
  1293.   lblBonusCountDown = "-63" '//Amount left till bonus available
  1294.   pBar.Value = 0 '//Total Roll Progress Bar
  1295.   lblRollNumber = "0" '//Visible Text Roll Number Counter
  1296.   RollCount = 0 '//Actual Roll Counter Variable
  1297.   imgRoll.Enabled = True '//Enable clicking of the Roll Button
  1298.   imgRoll.Picture = ImageList1.ListImages(2).Picture '//Set picture to normal
  1299.   For i = 0 To 4
  1300.     imgDice(i).Picture = ilDice.ListImages(1).Picture '//Set dice pics to #1
  1301.     chkDice(i).Enabled = False '//Disable dice checkboxes
  1302.     chkDice(i).Value = 0 '//Set dice checkboxes to greyed
  1303.     labClick(i).Enabled = False '//Disable top labels over dice
  1304.   Next i
  1305.   '//Undo variables
  1306.   mnuGame(2).Enabled = False '//Disable undo menu item
  1307.   uGameTotal = 0
  1308.   uBonusCountDown = 0
  1309.   uBonus63 = 0
  1310.   ulColTotal = 0
  1311.   uYatzeeBonus = False
  1312. End Sub
  1313. Private Sub Roll() '//Roll Dice
  1314. Dim i As Integer, j As Integer
  1315.   If pBar.Value = 0 Then '//If first roll of game enable all score values
  1316.     For i = 0 To 13
  1317.       lblNums(i).Enabled = True
  1318.       lblScores(i).Enabled = True
  1319.     Next i
  1320.   End If
  1321.         
  1322.   Randomize  '//Initializes the random-number generator.
  1323.   For i = 0 To 4
  1324.     j = (Int(6 * Rnd)) '//Set j to random number between 1 and 6
  1325.     chkDice(i).Enabled = True '//Enable dice checkboxes
  1326.     '//Set enabled checkbox dice pictures to correct number
  1327.     '//If it's 0 we know it's not been checked
  1328.     If chkDice(i).Value = 0 Then imgDice(i).Picture = ilDice.ListImages(j + 1).Picture
  1329.     '//Set our variable so we know what the last roll dice value was...
  1330.     '//If it's 0 we know it's not been checked
  1331.     If chkDice(i).Value = 0 Then die(i) = j + 1
  1332.   Next i
  1333.   If RollCount = 3 Then '//Turn is over
  1334.     imgRoll.Enabled = False '//Disable Roll button
  1335.     imgRoll.Picture = ImageList1.ListImages(7).Picture '//Change to disabled pic
  1336.     For i = 0 To 4
  1337.       
  1338.       chkDice(i).Value = 2 '//Set all checkboxes to selected
  1339.       chkDice(i).Enabled = False '//Disable all checkboxes
  1340.       labClick(i).Enabled = False '//Disable all dice covering labels
  1341.     Next i
  1342.     RollCount = 0 '//Set our roll count back to zero
  1343.   End If
  1344.   Call CheckAllScores
  1345. End Sub
  1346. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  1347.   hHelp.HHClose '//Close our help class
  1348.   Set hHelp = Nothing '//Give back it's memory
  1349. End Sub
  1350. Private Sub Form_Unload(Cancel As Integer)
  1351. Dim i As Integer
  1352.   '//Close all sub forms if any open
  1353.   For i = Forms.Count - 1 To 1 Step -1
  1354.     Unload Forms(i)
  1355.   Next
  1356.   '//Save screen position
  1357.   If Me.WindowState <> vbMinimized Then
  1358.         
  1359.     SaveSetting MyApp, "Settings", "MainLeft", Me.Left '//Forms left position
  1360.     SaveSetting MyApp, "Settings", "MainTop", Me.Top '//Forms top position
  1361.   End If
  1362. End Sub
  1363. Private Sub imgRoll_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  1364.   If Button = 2 Then Exit Sub '//If it's the right mouse button just exit
  1365.   If mnuSound.Checked Then PlaySound App.Path & "\roll.wav" '//Play sound if available
  1366.   imgRoll.Picture = ImageList1.ListImages(1).Picture '//Change pic to down picture
  1367. End Sub
  1368. Private Sub imgRoll_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  1369.   If Button = 2 Then Exit Sub '//If it's the right mouse button just exit
  1370.   imgRoll.Picture = ImageList1.ListImages(2).Picture '//Change pic to up picture
  1371. End Sub
  1372. Private Sub imgRoll_Click()
  1373. Dim i As Integer
  1374.   mnuGame(2).Enabled = False '//Disable undo menu item
  1375.   If RollCount = 0 Then '//First roll of turn
  1376.     For i = 0 To 4
  1377.       
  1378.       chkDice(i).Value = 0 '//Reset checkboxes to zero
  1379.       chkDice(i).Enabled = True '//Allow clicking of checkboxes
  1380.       labClick(i).Enabled = True '//Allow clicking of dice label covers
  1381.     Next
  1382.   End If
  1383.   RollCount = RollCount + 1 '//Update our roll count
  1384.   lblRollNumber = RollCount '//Update our visible roll count
  1385.   Call Roll '//Do the dice roll subroutine
  1386. End Sub
  1387. Private Sub labClick_Click(Index As Integer)
  1388.   '//Set value to opposite
  1389.   If chkDice(Index).Value = 0 Then chkDice(Index).Value = 1: Exit Sub
  1390.   If chkDice(Index).Value = 1 Then chkDice(Index).Value = 0
  1391. End Sub
  1392. Private Sub lblNums_Click(Index As Integer)
  1393.   Call lblScores_Click(Index) '//Do same thing as lblscores_click
  1394. End Sub
  1395. Private Sub UndoPlay()
  1396. Dim i As Integer
  1397.   mnuGame(2).Enabled = False '//Disable undo menu item
  1398.   If uIndex = 11 Then
  1399.     lblNums(13).Enabled = True '//Set bonus yahtzee to available again
  1400.     lblNums(13) = "X"
  1401.     lblScores(13).Enabled = True
  1402.   End If
  1403.   '//Reset item score number
  1404.   With lblNums(uIndex)
  1405.     .Caption = "X"
  1406.     .FontStrikethru = False
  1407.     .Enabled = True
  1408.   End With
  1409.   '//Reset item text
  1410.   With lblScores(uIndex)
  1411.     .FontStrikethru = False
  1412.     .Enabled = True
  1413.   End With
  1414.   If pBar.Value <> 0 Then pBar.Value = pBar.Value - 1 '//Move pBar.Value back
  1415.   lblGTotal = uGameTotal '//Move last score back
  1416.   lblBonusCountDown = uBonusCountDown '//Set bonus countdown amount back
  1417.   lblScoreBonus = uBonus63 '//Set bonus back to last state
  1418.   lblLScoreTotal = ulColTotal '//Set left column total back
  1419.   uYatzeeBonus = True '//Let's check all scores no we are calling it from an undo
  1420.   If uRollCount <> 3 And uRollCount <> 0 Then '//Allows for roll again if not last turn
  1421.     RollCount = uRollCount '//Restores old roll number
  1422.     lblRollNumber = RollCount '//Makes roll number visible to user
  1423.     imgRoll.Enabled = True '//Enable Roll button incase it was off
  1424.     imgRoll.Picture = ImageList1.ListImages(2).Picture '//Reset picture to default
  1425.     For i = 0 To 4
  1426.       chkDice(i).Enabled = True '//Allow clicking of checkboxes
  1427.       labClick(i).Enabled = True '//Allow clicking of dice label covers
  1428.     Next i
  1429.   Else '//Turn was last so keep roll button disabled
  1430.     imgRoll.Enabled = False '//Disable Roll button incase it was off
  1431.     imgRoll.Picture = ImageList1.ListImages(7).Picture '//Reset picture to done
  1432.   End If
  1433.   Call CheckAllScores '//Update available scoring positions
  1434. End Sub
  1435. Private Sub lblScores_Click(Index As Integer)
  1436. Dim i As Integer
  1437.   If Index = 13 Then Exit Sub '//Bonus yahtzee - not a user clickable score
  1438.   If lblNums(Index) = "X" Then Exit Sub '//Exit if we clicked an unusable one
  1439.   '//Undo routine items
  1440.   uIndex = Index '//Track clicked item for undo routine
  1441.   mnuGame(2).Enabled = True '//Enable undo menu item
  1442.   uGameTotal = lblGTotal '//Tracks last game total
  1443.   uBonusCountDown = lblBonusCountDown '//Tracks bonus countdown amount
  1444.   uBonus63 = lblScoreBonus '//Tracks bonus amount
  1445.   ulColTotal = lblLScoreTotal '//Tracks left score total
  1446.   uYatzeeBonus = False '//Resets undo mode tracker to false
  1447.   uRollCount = RollCount '//Tracks roll number
  1448.   For i = 0 To 4
  1449.     chkDice(i).Enabled = False '//Not allow clicking of checkboxes
  1450.     labClick(i).Enabled = False '//Not allow clicking of dice label covers
  1451.   Next i
  1452.   lblScores(Index).Enabled = False '//Disable this item
  1453.   lblScores(Index).FontStrikethru = True '//Add font strikethrou so we know it's used
  1454.   lblNums(Index).Enabled = False '//Disable this item
  1455.   lblNums(Index).FontStrikethru = True '//Add font strikethrou so we know it's used
  1456.      
  1457.   lblLScoreTotal = 0 '//Reset left scoring column to zero
  1458.   rColTotal = 0 '//Reset left scoring column to zero
  1459.   '//Process for all score clicks
  1460.   '//---Left columns
  1461.   For i = 0 To 5
  1462.     If lblNums(i).Enabled = False Then '//Only used disabled items for scoring
  1463.       
  1464.       lblLScoreTotal = CStr(Int(lblLScoreTotal) + Int(lblNums(i))) '//Show left column score
  1465.       lColTotal = Int(lblLScoreTotal) '//Total left column score
  1466.     End If
  1467.     If lblNums(i).Enabled = True Then '//It's not been used, set it back to normal
  1468.       
  1469.       lblNums(i) = "X" '//This isn't used yet so put value back to "X"
  1470.     End If
  1471.     lblNums(i).ForeColor = vbBlack '//Reset scoreing colors back to black
  1472.   Next i
  1473.   If lColTotal >= 63 Then '//Bonus available
  1474.     lblScoreBonus = 35 '//They got their bonus, set the value
  1475.     Bonus63 = 35 '//Variable to hold the bonus amount
  1476.     lblBonusCountDown = 0 '//Show 0 since they got the bonus
  1477.   Else '//No bonus available
  1478.     lblScoreBonus = 0 '//No bonus yet, keep at zero
  1479.     Bonus63 = 0 '//Variable to hold the bonus amount
  1480.     lblBonusCountDown = -63 + lColTotal '//Tell how much is left to go till bonus
  1481.   End If
  1482.   '//---End Left columns
  1483.   '//---Right columns
  1484.   For i = 6 To 12
  1485.     If lblNums(i).Enabled = False Then '//Only use disabled items to score
  1486.       
  1487.       rColTotal = rColTotal + Int(lblNums(i)) '//Add right column total
  1488.     End If '//If enabled set it back to default
  1489.     If lblNums(i).Enabled Then lblNums(i) = "X" '//Not used so put back to "X"
  1490.     lblNums(i).ForeColor = vbBlack '//Reset scoreing colors back to black
  1491.   Next i
  1492.   '//Add in the bonus yahtzee if there...
  1493.   If lblNums(13).Enabled = True Then
  1494.     If lblNums(11).Enabled = False And lblNums(11) = "0" Then '//Yahtzee is used and 0
  1495.       
  1496.       lblNums(13).Enabled = False '//Disable bonus yahtzee
  1497.       lblScores(13).Enabled = False '//Disable bonus yahtzee
  1498.       lblNums(13) = 0 '//Set bonus yahtzee score to zero
  1499.     End If
  1500.   End If
  1501.   '//Set bonus yahtzee score to 0 if last turn and no bonus still
  1502.   If lblNums(13) = "X" And pBar.Value = 13 Then
  1503.     lblNums(13) = 0 '//Set it to zero score
  1504.     lblNums(13).Enabled = False '//Disable
  1505.     lblScores(13).Enabled = False '//Disable
  1506.   End If
  1507.   If lblNums(13) <> "X" Then rColTotal = rColTotal + Int(lblNums(13)) '//Add yahtzee bonus total to score
  1508.   '//---End right columns
  1509.   GameTotal = (Bonus63 + lColTotal + rColTotal) '//Game score total
  1510.   lblGTotal = GameTotal '//Form visible game score total label
  1511.   If pBar.Value = 12 Then '//Game is over
  1512.     pBar.Value = pBar.Value + 1 '//Fill progress bar to max level
  1513.     If CheckForHS = False Then '//Sub to determine if score is in top 5
  1514.       
  1515.       frmGameOver.Show vbModal '//Score was lower then top 5 show game over form
  1516.     Else '//Score was in top 5
  1517.       If frmMain.mnuSound.Checked Then PlaySound App.Path & "\Excited.wav" '//Sound:)
  1518.       
  1519.       frmHighScore.Show vbModal '//If score was in top 5 show high score form
  1520.     End If
  1521.       
  1522.     Call UpdateStats(GameTotal)  '//Add this game to the statistics
  1523.     Call NewGame '//Reset game to new
  1524.     Exit Sub
  1525.   End If
  1526.   imgRoll.Enabled = True '//Enable Roll button incase it was off
  1527.   imgRoll.Picture = ImageList1.ListImages(2).Picture '//Reset picture to default
  1528.   lblRollNumber = 0 '//Set roll count back to zero
  1529.   RollCount = 0 '//Set our roll count back to zero
  1530.   pBar.Value = pBar.Value + 1 '//Update game progress bar
  1531. End Sub
  1532. Private Sub mnuGame_Click(Index As Integer)
  1533.   Select Case Index
  1534.        
  1535.     Case 0
  1536.       NewGame '//Start game over...
  1537.     Case 2
  1538.       Call UndoPlay '//Undo last score click...
  1539.     Case 4
  1540.       frmStats.Show vbModal '//Show statistics form
  1541.     Case 5
  1542.       frmHighScore.Show vbModal '//Show high scores form
  1543.     Case 7
  1544.       Unload Me '//Exit program
  1545.       End '//Just incase
  1546.   End Select
  1547. End Sub
  1548. Private Sub mnuHelp_Click(Index As Integer)
  1549.   Select Case Index
  1550.     '//Show help file
  1551.     Case 0
  1552.       
  1553.       With hHelp '//Help contents
  1554.        .CHMFile = App.Path & "\yahtzee.chm"
  1555.        .HHWindow = ""
  1556.        .HHDisplayContents
  1557.       End With
  1558.       
  1559.     Case 1
  1560.       
  1561.       With hHelp '//Help index
  1562.         .CHMFile = App.Path & "\yahtzee.chm"
  1563.         .HHWindow = ""
  1564.         .HHDisplayIndex
  1565.       End With
  1566.     Case 3
  1567.       frmAbout.Show vbModal '//Show about form
  1568.   End Select
  1569. End Sub
  1570. Private Sub mnuSound_Click() '//Toggle sound on or off
  1571.   mnuSound.Checked = Not mnuSound.Checked '//Set to opposite value
  1572.   SaveSetting MyApp, "Settings", "Sound", mnuSound.Checked  '//Save to registry
  1573. End Sub
  1574. Private Sub CheckAllScores()
  1575. ''//Hard to comment, hope you can understand this one!
  1576. '//This routine checks to see which scores can go where!
  1577. Dim i As Integer, j As Integer
  1578. Dim tmp As Integer
  1579. Dim RoundScore As Integer
  1580. Dim iPar As Boolean, iTriss As Boolean
  1581.   '//---Do left column numbers
  1582.   For i = 0 To 5
  1583.     tmp = 0
  1584.     If lblNums(i).Enabled = True Then '//Only check scores that are enabled
  1585.       
  1586.       For j = 0 To 4
  1587.         
  1588.         If die(j) = i + 1 Then tmp = tmp + (i + 1)
  1589.         
  1590.         lblNums(i) = tmp '//Update label with correct score value
  1591.       
  1592.       Next j
  1593.     End If
  1594.   Next i
  1595.   '//---End of left column numbers
  1596.   '//---Three of a kind
  1597.   If lblNums(6).Enabled = True Then
  1598.     For i = 0 To 5
  1599.       
  1600.       tmp = 0
  1601.       
  1602.       For j = 0 To 4
  1603.       
  1604.         If imgDice(j).Picture = ilDice.ListImages(i + 1).Picture Then tmp = tmp + 1
  1605.       
  1606.       Next j
  1607.     If tmp >= 3 Then
  1608.       
  1609.       lblNums(6) = die(0) + die(1) + die(2) + die(3) + die(4)
  1610.       Exit For
  1611.     Else
  1612.     lblNums(6) = 0
  1613.     End If
  1614.     Next i
  1615.   End If
  1616.   '//---End three of a kind
  1617.   '//---Four of a kind
  1618.   If lblNums(7).Enabled = True Then
  1619.     For i = 0 To 5
  1620.       
  1621.       tmp = 0
  1622.       For j = 0 To 4
  1623.       
  1624.         If imgDice(j).Picture = ilDice.ListImages(i + 1).Picture Then tmp = tmp + 1
  1625.       
  1626.       Next j
  1627.       If tmp >= 4 Then
  1628.         
  1629.         lblNums(7) = die(0) + die(1) + die(2) + die(3) + die(4)
  1630.         Exit For
  1631.       
  1632.       Else
  1633.       
  1634.         lblNums(7) = 0
  1635.       
  1636.       End If
  1637.     Next i
  1638.   End If
  1639.   '//---End four of a kind
  1640.   '//---Full house
  1641.   If lblNums(8).Enabled = True Then
  1642.     iPar = False
  1643.     iTriss = False
  1644.     For i = 0 To 5
  1645.       
  1646.       tmp = 0
  1647.       
  1648.       For j = 0 To 4
  1649.       
  1650.         If imgDice(j).Picture = ilDice.ListImages(i + 1).Picture Then tmp = tmp + 1
  1651.       
  1652.       Next j
  1653.       If tmp = 2 Then
  1654.         
  1655.         RoundScore = RoundScore + (i + 1) * 2
  1656.         iPar = True
  1657.       
  1658.       End If
  1659.             
  1660.       If tmp = 3 Then
  1661.       
  1662.         RoundScore = RoundScore + (i + 1) * 3
  1663.         iTriss = True
  1664.       
  1665.       End If
  1666.   Next i
  1667.   RoundScore = 25
  1668.   If Not iPar Or Not iTriss Then RoundScore = 0
  1669.   lblNums(8) = RoundScore
  1670.   End If
  1671.   '//---End full house
  1672.   '//---Small straight
  1673.   If lblNums(9).Enabled = True Then
  1674.     Dim a As Integer, b As Integer, c As Integer
  1675.     Dim d As Integer, e As Integer, g As Integer
  1676.     a = 9: b = 9: c = 9: d = 9: e = 9: g = 9
  1677.     lblNums(9) = 0
  1678.     For i = 0 To 4
  1679.       
  1680.       If die(i) = 1 Then a = 0
  1681.       If die(i) = 2 Then b = 1
  1682.       If die(i) = 3 Then c = 2
  1683.       If die(i) = 4 Then d = 3
  1684.       If die(i) = 5 Then e = 4
  1685.       If die(i) = 6 Then g = 5
  1686.     Next i
  1687.     If a = 0 And b = 1 And c = 2 And d = 3 Then lblNums(9) = 30
  1688.     If b = 1 And c = 2 And d = 3 And e = 4 Then lblNums(9) = 30
  1689.     If c = 2 And d = 3 And e = 4 And g = 5 Then lblNums(9) = 30
  1690.   End If
  1691.   '//---End small straight
  1692.   '//---Large straight
  1693.   If lblNums(10).Enabled = True Then
  1694.     lblNums(10) = 40
  1695.     For i = 0 To 4
  1696.       For j = 0 To 4
  1697.         
  1698.         If Not i = j Then
  1699.           
  1700.           If imgDice(i).Picture = imgDice(j).Picture Or _
  1701.           imgDice(i).Picture = ilDice.ListImages(1).Picture And imgDice(j).Picture = ilDice.ListImages(6).Picture Then _
  1702.           lblNums(10) = 0
  1703.       
  1704.         End If
  1705.       
  1706.       Next j
  1707.     Next i
  1708.   End If
  1709.   '//--End large straight
  1710.   '//---Yahtzee
  1711.   If lblNums(11).Enabled = True Then
  1712.     If die(0) = die(1) And die(0) = die(2) And die(0) = die(3) And die(0) = die(4) Then
  1713.       
  1714.       lblNums(11) = 50
  1715.       
  1716.       If mnuSound.Checked Then PlaySound App.Path & "\Tada.wav" 'Play sound if available
  1717.     Else
  1718.       
  1719.       lblNums(11) = 0
  1720.     End If
  1721.   End If
  1722.   '//---End yahtzee
  1723.   '//---Chance
  1724.   If lblNums(12).Enabled = True Then
  1725.     lblNums(12) = 0
  1726.     For i = 0 To 4
  1727.       
  1728.       lblNums(12) = lblNums(12) + die(i)
  1729.     Next i
  1730.   End If
  1731.   '//---End chance
  1732.   '//---If it's a yahtzee then we need to allow total item value if used there
  1733.   If die(0) = die(1) And die(0) = die(2) And die(0) = die(3) And die(0) = die(4) Then
  1734.     If lblNums(13).Enabled = False Then GoTo SkipMe '//Bonus has been closed
  1735.     '//Left Columns
  1736.     For i = 0 To 5
  1737.       
  1738.       If lblNums(i).Enabled = True Then
  1739.         
  1740.         lblNums(i) = (i + 1) * 5
  1741.       
  1742.       End If
  1743.     Next i
  1744.     '//Three of a kind
  1745.     If lblNums(6).Enabled = True Then lblNums(6) = die(0) * 5
  1746.     '//Four of a kind
  1747.     If lblNums(7).Enabled = True Then lblNums(7) = die(0) * 5
  1748.     '//Full house
  1749.     If lblNums(8).Enabled = True Then lblNums(8) = 25
  1750.     '//Small straight
  1751.     If lblNums(9).Enabled = True Then lblNums(9) = 30
  1752.     '//Large straight
  1753.     If lblNums(10).Enabled = True Then lblNums(10) = 40
  1754.     '//Bonus Yahtzee
  1755.     If uYatzeeBonus = False Then
  1756.       
  1757.       If lblNums(11).Enabled = False And lblNums(11) = "50" Then
  1758.       
  1759.         If mnuSound.Checked Then PlaySound App.Path & "\Tada.wav" '//Play sound if available
  1760.       
  1761.         If lblNums(13).Enabled = True Then
  1762.       
  1763.           If lblNums(13) = "X" Then
  1764.         
  1765.             lblNums(13) = 100
  1766.       
  1767.           Else
  1768.         
  1769.             lblNums(13) = CStr(Int(lblNums(13) + 100))
  1770.       
  1771.           End If
  1772.         End If
  1773.       End If
  1774.     End If
  1775.   End If
  1776. SkipMe:
  1777.   '//Set all enabled items to blue
  1778.   For i = 0 To 12
  1779.     If lblNums(i).Enabled = True Then lblNums(i).ForeColor = vbBlue
  1780.   Next i
  1781. End Sub
  1782.