home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / hangman / hangman.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-06  |  31.1 KB  |  946 lines

  1. VERSION 5.00
  2. Begin VB.Form frmHangman 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H80000004&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "  Hangman"
  7.    ClientHeight    =   4680
  8.    ClientLeft      =   4350
  9.    ClientTop       =   3315
  10.    ClientWidth     =   4155
  11.    ForeColor       =   &H00000000&
  12.    Icon            =   "Hangman.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4680
  17.    ScaleWidth      =   4155
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   2  'CenterScreen
  20.    Begin VB.TextBox GamesLost 
  21.       BackColor       =   &H80000004&
  22.       Height          =   285
  23.       Left            =   2280
  24.       TabIndex        =   32
  25.       Top             =   4305
  26.       Width           =   1695
  27.    End
  28.    Begin VB.TextBox GamesWon 
  29.       BackColor       =   &H80000004&
  30.       Height          =   270
  31.       Left            =   480
  32.       TabIndex        =   31
  33.       Top             =   4320
  34.       Width           =   1695
  35.    End
  36.    Begin VB.PictureBox picLogo 
  37.       AutoRedraw      =   -1  'True
  38.       BorderStyle     =   0  'None
  39.       BeginProperty Font 
  40.          Name            =   "Arial"
  41.          Size            =   9.75
  42.          Charset         =   0
  43.          Weight          =   700
  44.          Underline       =   0   'False
  45.          Italic          =   0   'False
  46.          Strikethrough   =   0   'False
  47.       EndProperty
  48.       ForeColor       =   &H8000000E&
  49.       Height          =   9375
  50.       Left            =   0
  51.       ScaleHeight     =   9375
  52.       ScaleWidth      =   255
  53.       TabIndex        =   30
  54.       Top             =   -15
  55.       Width           =   255
  56.    End
  57.    Begin VB.Frame Frame1 
  58.       Height          =   615
  59.       Left            =   480
  60.       TabIndex        =   0
  61.       Top             =   2940
  62.       Width           =   3495
  63.       Begin VB.Label txtWord 
  64.          Alignment       =   2  'Center
  65.          BeginProperty Font 
  66.             Name            =   "MS Sans Serif"
  67.             Size            =   9.75
  68.             Charset         =   0
  69.             Weight          =   700
  70.             Underline       =   0   'False
  71.             Italic          =   0   'False
  72.             Strikethrough   =   0   'False
  73.          EndProperty
  74.          ForeColor       =   &H00000000&
  75.          Height          =   285
  76.          Left            =   135
  77.          TabIndex        =   2
  78.          Top             =   225
  79.          Width           =   3225
  80.       End
  81.    End
  82.    Begin VB.Frame Frame3 
  83.       ClipControls    =   0   'False
  84.       Height          =   2910
  85.       Left            =   480
  86.       TabIndex        =   1
  87.       Top             =   15
  88.       Width           =   3495
  89.       Begin VB.Shape Head 
  90.          BorderColor     =   &H00C00000&
  91.          BorderWidth     =   2
  92.          FillColor       =   &H0080C0FF&
  93.          FillStyle       =   0  'Solid
  94.          Height          =   600
  95.          Left            =   1620
  96.          Shape           =   2  'Oval
  97.          Top             =   525
  98.          Visible         =   0   'False
  99.          Width           =   555
  100.       End
  101.       Begin VB.Line RArm 
  102.          BorderColor     =   &H00C00000&
  103.          BorderWidth     =   6
  104.          Visible         =   0   'False
  105.          X1              =   1365
  106.          X2              =   1650
  107.          Y1              =   1335
  108.          Y2              =   1335
  109.       End
  110.       Begin VB.Line LArm 
  111.          BorderColor     =   &H00C00000&
  112.          BorderWidth     =   6
  113.          Visible         =   0   'False
  114.          X1              =   2145
  115.          X2              =   2475
  116.          Y1              =   1335
  117.          Y2              =   1335
  118.       End
  119.       Begin VB.Line HangVer 
  120.          BorderColor     =   &H00000080&
  121.          BorderWidth     =   6
  122.          Visible         =   0   'False
  123.          X1              =   675
  124.          X2              =   675
  125.          Y1              =   2595
  126.          Y2              =   390
  127.       End
  128.       Begin VB.Line HangHor 
  129.          BorderColor     =   &H00000080&
  130.          BorderWidth     =   6
  131.          Visible         =   0   'False
  132.          X1              =   690
  133.          X2              =   1905
  134.          Y1              =   330
  135.          Y2              =   330
  136.       End
  137.       Begin VB.Line Rope 
  138.          BorderColor     =   &H00800000&
  139.          BorderWidth     =   3
  140.          Visible         =   0   'False
  141.          X1              =   1890
  142.          X2              =   1890
  143.          Y1              =   300
  144.          Y2              =   480
  145.       End
  146.       Begin VB.Line HangAng 
  147.          BorderColor     =   &H00000080&
  148.          BorderWidth     =   8
  149.          Visible         =   0   'False
  150.          X1              =   1050
  151.          X2              =   690
  152.          Y1              =   360
  153.          Y2              =   720
  154.       End
  155.       Begin VB.Line HangBase 
  156.          BorderColor     =   &H00000080&
  157.          BorderWidth     =   6
  158.          Visible         =   0   'False
  159.          X1              =   330
  160.          X2              =   1050
  161.          Y1              =   2625
  162.          Y2              =   2625
  163.       End
  164.       Begin VB.Line RLeg 
  165.          BorderColor     =   &H00C00000&
  166.          BorderWidth     =   8
  167.          Visible         =   0   'False
  168.          X1              =   1785
  169.          X2              =   1605
  170.          Y1              =   2025
  171.          Y2              =   2400
  172.       End
  173.       Begin VB.Line LLeg 
  174.          BorderColor     =   &H00C00000&
  175.          BorderWidth     =   8
  176.          Visible         =   0   'False
  177.          X1              =   2025
  178.          X2              =   2220
  179.          Y1              =   2025
  180.          Y2              =   2415
  181.       End
  182.       Begin VB.Line Body 
  183.          BorderColor     =   &H00C00000&
  184.          BorderStyle     =   6  'Inside Solid
  185.          BorderWidth     =   26
  186.          Visible         =   0   'False
  187.          X1              =   1905
  188.          X2              =   1905
  189.          Y1              =   1335
  190.          Y2              =   1785
  191.       End
  192.    End
  193.    Begin VB.Frame Frame2 
  194.       Height          =   735
  195.       Left            =   480
  196.       TabIndex        =   3
  197.       Top             =   3540
  198.       Width           =   3495
  199.       Begin VB.Label lblLetter 
  200.          Alignment       =   2  'Center
  201.          Caption         =   "Z"
  202.          BeginProperty Font 
  203.             Name            =   "MS Sans Serif"
  204.             Size            =   8.25
  205.             Charset         =   0
  206.             Weight          =   700
  207.             Underline       =   0   'False
  208.             Italic          =   0   'False
  209.             Strikethrough   =   0   'False
  210.          EndProperty
  211.          Height          =   240
  212.          Index           =   25
  213.          Left            =   2880
  214.          TabIndex        =   29
  215.          Top             =   450
  216.          Width           =   195
  217.       End
  218.       Begin VB.Label lblLetter 
  219.          Alignment       =   2  'Center
  220.          Caption         =   "Y"
  221.          BeginProperty Font 
  222.             Name            =   "MS Sans Serif"
  223.             Size            =   8.25
  224.             Charset         =   0
  225.             Weight          =   700
  226.             Underline       =   0   'False
  227.             Italic          =   0   'False
  228.             Strikethrough   =   0   'False
  229.          EndProperty
  230.          Height          =   240
  231.          Index           =   24
  232.          Left            =   2655
  233.          TabIndex        =   28
  234.          Top             =   450
  235.          Width           =   195
  236.       End
  237.       Begin VB.Label lblLetter 
  238.          Alignment       =   2  'Center
  239.          Caption         =   "X"
  240.          BeginProperty Font 
  241.             Name            =   "MS Sans Serif"
  242.             Size            =   8.25
  243.             Charset         =   0
  244.             Weight          =   700
  245.             Underline       =   0   'False
  246.             Italic          =   0   'False
  247.             Strikethrough   =   0   'False
  248.          EndProperty
  249.          Height          =   240
  250.          Index           =   23
  251.          Left            =   2430
  252.          TabIndex        =   27
  253.          Top             =   450
  254.          Width           =   195
  255.       End
  256.       Begin VB.Label lblLetter 
  257.          Alignment       =   2  'Center
  258.          Caption         =   "W"
  259.          BeginProperty Font 
  260.             Name            =   "MS Sans Serif"
  261.             Size            =   8.25
  262.             Charset         =   0
  263.             Weight          =   700
  264.             Underline       =   0   'False
  265.             Italic          =   0   'False
  266.             Strikethrough   =   0   'False
  267.          EndProperty
  268.          Height          =   240
  269.          Index           =   22
  270.          Left            =   2205
  271.          TabIndex        =   26
  272.          Top             =   450
  273.          Width           =   195
  274.       End
  275.       Begin VB.Label lblLetter 
  276.          Alignment       =   2  'Center
  277.          Caption         =   "V"
  278.          BeginProperty Font 
  279.             Name            =   "MS Sans Serif"
  280.             Size            =   8.25
  281.             Charset         =   0
  282.             Weight          =   700
  283.             Underline       =   0   'False
  284.             Italic          =   0   'False
  285.             Strikethrough   =   0   'False
  286.          EndProperty
  287.          Height          =   240
  288.          Index           =   21
  289.          Left            =   1980
  290.          TabIndex        =   25
  291.          Top             =   450
  292.          Width           =   195
  293.       End
  294.       Begin VB.Label lblLetter 
  295.          Alignment       =   2  'Center
  296.          Caption         =   "U"
  297.          BeginProperty Font 
  298.             Name            =   "MS Sans Serif"
  299.             Size            =   8.25
  300.             Charset         =   0
  301.             Weight          =   700
  302.             Underline       =   0   'False
  303.             Italic          =   0   'False
  304.             Strikethrough   =   0   'False
  305.          EndProperty
  306.          Height          =   240
  307.          Index           =   20
  308.          Left            =   1800
  309.          TabIndex        =   24
  310.          Top             =   450
  311.          Width           =   195
  312.       End
  313.       Begin VB.Label lblLetter 
  314.          Alignment       =   2  'Center
  315.          Caption         =   "T"
  316.          BeginProperty Font 
  317.             Name            =   "MS Sans Serif"
  318.             Size            =   8.25
  319.             Charset         =   0
  320.             Weight          =   700
  321.             Underline       =   0   'False
  322.             Italic          =   0   'False
  323.             Strikethrough   =   0   'False
  324.          EndProperty
  325.          Height          =   240
  326.          Index           =   19
  327.          Left            =   1575
  328.          TabIndex        =   23
  329.          Top             =   450
  330.          Width           =   195
  331.       End
  332.       Begin VB.Label lblLetter 
  333.          Alignment       =   2  'Center
  334.          Caption         =   "S"
  335.          BeginProperty Font 
  336.             Name            =   "MS Sans Serif"
  337.             Size            =   8.25
  338.             Charset         =   0
  339.             Weight          =   700
  340.             Underline       =   0   'False
  341.             Italic          =   0   'False
  342.             Strikethrough   =   0   'False
  343.          EndProperty
  344.          Height          =   240
  345.          Index           =   18
  346.          Left            =   1350
  347.          TabIndex        =   22
  348.          Top             =   450
  349.          Width           =   195
  350.       End
  351.       Begin VB.Label lblLetter 
  352.          Alignment       =   2  'Center
  353.          Caption         =   "R"
  354.          BeginProperty Font 
  355.             Name            =   "MS Sans Serif"
  356.             Size            =   8.25
  357.             Charset         =   0
  358.             Weight          =   700
  359.             Underline       =   0   'False
  360.             Italic          =   0   'False
  361.             Strikethrough   =   0   'False
  362.          EndProperty
  363.          Height          =   240
  364.          Index           =   17
  365.          Left            =   1125
  366.          TabIndex        =   21
  367.          Top             =   450
  368.          Width           =   195
  369.       End
  370.       Begin VB.Label lblLetter 
  371.          Alignment       =   2  'Center
  372.          Caption         =   "Q"
  373.          BeginProperty Font 
  374.             Name            =   "MS Sans Serif"
  375.             Size            =   8.25
  376.             Charset         =   0
  377.             Weight          =   700
  378.             Underline       =   0   'False
  379.             Italic          =   0   'False
  380.             Strikethrough   =   0   'False
  381.          EndProperty
  382.          Height          =   240
  383.          Index           =   16
  384.          Left            =   900
  385.          TabIndex        =   20
  386.          Top             =   450
  387.          Width           =   195
  388.       End
  389.       Begin VB.Label lblLetter 
  390.          Alignment       =   2  'Center
  391.          Caption         =   "P"
  392.          BeginProperty Font 
  393.             Name            =   "MS Sans Serif"
  394.             Size            =   8.25
  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           =   15
  403.          Left            =   675
  404.          TabIndex        =   19
  405.          Top             =   450
  406.          Width           =   195
  407.       End
  408.       Begin VB.Label lblLetter 
  409.          Alignment       =   2  'Center
  410.          Caption         =   "O"
  411.          BeginProperty Font 
  412.             Name            =   "MS Sans Serif"
  413.             Size            =   8.25
  414.             Charset         =   0
  415.             Weight          =   700
  416.             Underline       =   0   'False
  417.             Italic          =   0   'False
  418.             Strikethrough   =   0   'False
  419.          EndProperty
  420.          Height          =   240
  421.          Index           =   14
  422.          Left            =   450
  423.          TabIndex        =   18
  424.          Top             =   450
  425.          Width           =   195
  426.       End
  427.       Begin VB.Label lblLetter 
  428.          Alignment       =   2  'Center
  429.          Caption         =   "N"
  430.          BeginProperty Font 
  431.             Name            =   "MS Sans Serif"
  432.             Size            =   8.25
  433.             Charset         =   0
  434.             Weight          =   700
  435.             Underline       =   0   'False
  436.             Italic          =   0   'False
  437.             Strikethrough   =   0   'False
  438.          EndProperty
  439.          Height          =   240
  440.          Index           =   13
  441.          Left            =   225
  442.          TabIndex        =   17
  443.          Top             =   450
  444.          Width           =   195
  445.       End
  446.       Begin VB.Label lblLetter 
  447.          Alignment       =   2  'Center
  448.          Caption         =   "M"
  449.          BeginProperty Font 
  450.             Name            =   "MS Sans Serif"
  451.             Size            =   8.25
  452.             Charset         =   0
  453.             Weight          =   700
  454.             Underline       =   0   'False
  455.             Italic          =   0   'False
  456.             Strikethrough   =   0   'False
  457.          EndProperty
  458.          Height          =   240
  459.          Index           =   12
  460.          Left            =   2880
  461.          TabIndex        =   16
  462.          Top             =   165
  463.          Width           =   195
  464.       End
  465.       Begin VB.Label lblLetter 
  466.          Alignment       =   2  'Center
  467.          Caption         =   "L"
  468.          BeginProperty Font 
  469.             Name            =   "MS Sans Serif"
  470.             Size            =   8.25
  471.             Charset         =   0
  472.             Weight          =   700
  473.             Underline       =   0   'False
  474.             Italic          =   0   'False
  475.             Strikethrough   =   0   'False
  476.          EndProperty
  477.          Height          =   240
  478.          Index           =   11
  479.          Left            =   2655
  480.          TabIndex        =   15
  481.          Top             =   180
  482.          Width           =   195
  483.       End
  484.       Begin VB.Label lblLetter 
  485.          Alignment       =   2  'Center
  486.          Caption         =   "K"
  487.          BeginProperty Font 
  488.             Name            =   "MS Sans Serif"
  489.             Size            =   8.25
  490.             Charset         =   0
  491.             Weight          =   700
  492.             Underline       =   0   'False
  493.             Italic          =   0   'False
  494.             Strikethrough   =   0   'False
  495.          EndProperty
  496.          Height          =   240
  497.          Index           =   10
  498.          Left            =   2430
  499.          TabIndex        =   14
  500.          Top             =   180
  501.          Width           =   195
  502.       End
  503.       Begin VB.Label lblLetter 
  504.          Alignment       =   2  'Center
  505.          Caption         =   "J"
  506.          BeginProperty Font 
  507.             Name            =   "MS Sans Serif"
  508.             Size            =   8.25
  509.             Charset         =   0
  510.             Weight          =   700
  511.             Underline       =   0   'False
  512.             Italic          =   0   'False
  513.             Strikethrough   =   0   'False
  514.          EndProperty
  515.          Height          =   240
  516.          Index           =   9
  517.          Left            =   2205
  518.          TabIndex        =   13
  519.          Top             =   180
  520.          Width           =   195
  521.       End
  522.       Begin VB.Label lblLetter 
  523.          Alignment       =   2  'Center
  524.          Caption         =   "I"
  525.          BeginProperty Font 
  526.             Name            =   "MS Sans Serif"
  527.             Size            =   8.25
  528.             Charset         =   0
  529.             Weight          =   700
  530.             Underline       =   0   'False
  531.             Italic          =   0   'False
  532.             Strikethrough   =   0   'False
  533.          EndProperty
  534.          Height          =   240
  535.          Index           =   8
  536.          Left            =   1980
  537.          TabIndex        =   12
  538.          Top             =   180
  539.          Width           =   195
  540.       End
  541.       Begin VB.Label lblLetter 
  542.          Alignment       =   2  'Center
  543.          Caption         =   "H"
  544.          BeginProperty Font 
  545.             Name            =   "MS Sans Serif"
  546.             Size            =   8.25
  547.             Charset         =   0
  548.             Weight          =   700
  549.             Underline       =   0   'False
  550.             Italic          =   0   'False
  551.             Strikethrough   =   0   'False
  552.          EndProperty
  553.          Height          =   240
  554.          Index           =   7
  555.          Left            =   1800
  556.          TabIndex        =   11
  557.          Top             =   180
  558.          Width           =   195
  559.       End
  560.       Begin VB.Label lblLetter 
  561.          Alignment       =   2  'Center
  562.          Caption         =   "G"
  563.          BeginProperty Font 
  564.             Name            =   "MS Sans Serif"
  565.             Size            =   8.25
  566.             Charset         =   0
  567.             Weight          =   700
  568.             Underline       =   0   'False
  569.             Italic          =   0   'False
  570.             Strikethrough   =   0   'False
  571.          EndProperty
  572.          Height          =   240
  573.          Index           =   6
  574.          Left            =   1575
  575.          TabIndex        =   10
  576.          Top             =   180
  577.          Width           =   195
  578.       End
  579.       Begin VB.Label lblLetter 
  580.          Alignment       =   2  'Center
  581.          Caption         =   "F"
  582.          BeginProperty Font 
  583.             Name            =   "MS Sans Serif"
  584.             Size            =   8.25
  585.             Charset         =   0
  586.             Weight          =   700
  587.             Underline       =   0   'False
  588.             Italic          =   0   'False
  589.             Strikethrough   =   0   'False
  590.          EndProperty
  591.          Height          =   240
  592.          Index           =   5
  593.          Left            =   1350
  594.          TabIndex        =   9
  595.          Top             =   180
  596.          Width           =   195
  597.       End
  598.       Begin VB.Label lblLetter 
  599.          Alignment       =   2  'Center
  600.          Caption         =   "E"
  601.          BeginProperty Font 
  602.             Name            =   "MS Sans Serif"
  603.             Size            =   8.25
  604.             Charset         =   0
  605.             Weight          =   700
  606.             Underline       =   0   'False
  607.             Italic          =   0   'False
  608.             Strikethrough   =   0   'False
  609.          EndProperty
  610.          Height          =   240
  611.          Index           =   4
  612.          Left            =   1125
  613.          TabIndex        =   8
  614.          Top             =   180
  615.          Width           =   195
  616.       End
  617.       Begin VB.Label lblLetter 
  618.          Alignment       =   2  'Center
  619.          Caption         =   "D"
  620.          BeginProperty Font 
  621.             Name            =   "MS Sans Serif"
  622.             Size            =   8.25
  623.             Charset         =   0
  624.             Weight          =   700
  625.             Underline       =   0   'False
  626.             Italic          =   0   'False
  627.             Strikethrough   =   0   'False
  628.          EndProperty
  629.          Height          =   240
  630.          Index           =   3
  631.          Left            =   900
  632.          TabIndex        =   7
  633.          Top             =   180
  634.          Width           =   195
  635.       End
  636.       Begin VB.Label lblLetter 
  637.          Alignment       =   2  'Center
  638.          Caption         =   "C"
  639.          BeginProperty Font 
  640.             Name            =   "MS Sans Serif"
  641.             Size            =   8.25
  642.             Charset         =   0
  643.             Weight          =   700
  644.             Underline       =   0   'False
  645.             Italic          =   0   'False
  646.             Strikethrough   =   0   'False
  647.          EndProperty
  648.          Height          =   240
  649.          Index           =   2
  650.          Left            =   675
  651.          TabIndex        =   6
  652.          Top             =   180
  653.          Width           =   195
  654.       End
  655.       Begin VB.Label lblLetter 
  656.          Alignment       =   2  'Center
  657.          Caption         =   "B"
  658.          BeginProperty Font 
  659.             Name            =   "MS Sans Serif"
  660.             Size            =   8.25
  661.             Charset         =   0
  662.             Weight          =   700
  663.             Underline       =   0   'False
  664.             Italic          =   0   'False
  665.             Strikethrough   =   0   'False
  666.          EndProperty
  667.          Height          =   240
  668.          Index           =   1
  669.          Left            =   450
  670.          TabIndex        =   5
  671.          Top             =   180
  672.          Width           =   195
  673.       End
  674.       Begin VB.Label lblLetter 
  675.          Alignment       =   2  'Center
  676.          Caption         =   "A"
  677.          BeginProperty Font 
  678.             Name            =   "MS Sans Serif"
  679.             Size            =   8.25
  680.             Charset         =   0
  681.             Weight          =   700
  682.             Underline       =   0   'False
  683.             Italic          =   0   'False
  684.             Strikethrough   =   0   'False
  685.          EndProperty
  686.          Height          =   240
  687.          Index           =   0
  688.          Left            =   225
  689.          TabIndex        =   4
  690.          Top             =   180
  691.          Width           =   195
  692.       End
  693.    End
  694.    Begin VB.Menu mnuFile 
  695.       Caption         =   "&File"
  696.       Begin VB.Menu mnuNew 
  697.          Caption         =   "&New Game"
  698.          Enabled         =   0   'False
  699.          Shortcut        =   {F2}
  700.          Visible         =   0   'False
  701.       End
  702.       Begin VB.Menu mnuLine 
  703.          Caption         =   "-"
  704.          Visible         =   0   'False
  705.       End
  706.       Begin VB.Menu mnuExit 
  707.          Caption         =   "E&xit"
  708.       End
  709.    End
  710.    Begin VB.Menu mnuHelp 
  711.       Caption         =   "&Help"
  712.       Begin VB.Menu mnuSound 
  713.          Caption         =   "&Sound"
  714.          Checked         =   -1  'True
  715.       End
  716.       Begin VB.Menu mnuInst 
  717.          Caption         =   "&Instrustions"
  718.       End
  719.       Begin VB.Menu mnuAbout 
  720.          Caption         =   "&About"
  721.       End
  722.    End
  723. Attribute VB_Name = "frmHangman"
  724. Attribute VB_GlobalNameSpace = False
  725. Attribute VB_Creatable = False
  726. Attribute VB_PredeclaredId = True
  727. Attribute VB_Exposed = False
  728. Option Explicit
  729. Dim iNumOfWords As Integer
  730. Dim sWords() As String
  731. Dim sWord As String
  732. Dim bGameStarted As Boolean
  733. Dim iGameStage As Integer
  734. Dim iResponse As Integer
  735. Dim iGamesWon As Integer
  736. Dim iGamesLost As Integer
  737. Dim LongGame As Integer
  738. Dim cL As New cLogo
  739. Private Sub Form_Load()
  740.     cL.DrawingObject = picLogo
  741.     cL.Caption = "Dennis Hallman"
  742.     Call subLoadFile
  743.     Call subNewGame
  744. End Sub
  745. Private Sub Form_Resize()
  746.     On Error Resume Next
  747.     picLogo.Height = Me.ScaleHeight
  748.     On Error GoTo 0
  749.     cL.Draw
  750. End Sub
  751. Private Sub Form_Unload(Cancel As Integer)
  752.     End
  753. End Sub
  754. Private Sub lblLetter_Click(Index As Integer)
  755.     Call subChooseLetter(Index)
  756. End Sub
  757. Private Sub mnuAbout_Click()
  758.     About.Show vbModal, Me
  759. End Sub
  760. Private Sub mnuExit_Click()
  761.     Unload Me
  762. End Sub
  763. Private Sub mnuSound_Click()
  764.     mnuSound.Checked = Not mnuSound.Checked
  765. End Sub
  766. Private Sub mnuInst_Click()
  767.     HelpPage.Show vbModal
  768. End Sub
  769. Private Sub mnuNew_Click()
  770.     If mnuNew.Enabled = True Then
  771.         Call subNewGame
  772.     End If
  773. End Sub
  774. Private Sub subNewGame()
  775.     Dim i As Integer
  776.     Dim ctr As Integer
  777.     On Error GoTo Produce_Error
  778.     '########################
  779.     HangBase.Visible = False
  780.     HangVer.Visible = False
  781.     HangHor.Visible = False
  782.     HangAng.Visible = False
  783.     '########################
  784.     Rope.Visible = False
  785.     Head.Visible = False
  786.     Body.Visible = False
  787.     LLeg.Visible = False
  788.     RLeg.Visible = False
  789.     LArm.Visible = False
  790.     RArm.Visible = False
  791.     txtWord.ForeColor = &H0&
  792.     bGameStarted = False
  793.     iGameStage = 0
  794.     mnuNew.Enabled = False
  795.     '########################
  796.     For i = 0 To 25
  797.         lblLetter(i).Visible = True
  798.     Next i
  799.     Randomize
  800.     ctr = 0
  801. GetWord:
  802.     i = Int(((iNumOfWords + 1) * Rnd) + 0)
  803.     ctr = ctr + 1
  804.     If ctr > iNumOfWords Then
  805.         iResponse = MsgBox("You have completed all the words, sorry!", vbOKOnly + vbExclamation, frmHangman.Caption)
  806.         Exit Sub
  807.     End If
  808.     If sWords(i, 1) = "" Then
  809.         sWord = sWords(i, 0)
  810.         sWords(i, 1) = "x"
  811.     Else
  812.         GoTo GetWord
  813.     End If
  814.     txtWord.Caption = ""
  815.     i = Len(Trim(sWord))
  816.     For ctr = 1 To i
  817.         txtWord.ForeColor = &H6F&
  818.         txtWord.Caption = txtWord.Caption & "_ "
  819.     Next ctr
  820.     bGameStarted = True
  821.     Exit Sub
  822. Produce_Error:
  823.     iResponse = MsgBox("Error Number " & Err.Number & " - " & Err.Description & ".", vbOKOnly + vbExclamation, frmHangman.Caption)
  824. End Sub
  825. Private Sub subChooseLetter(Index)
  826.     Dim sLetter As String
  827.     Dim DummyWord As String
  828.     Dim i As Integer
  829.     On Error GoTo Produce_Error
  830.     If lblLetter(Index).Visible = True And bGameStarted Then
  831.         lblLetter(Index).Visible = False
  832.         If mnuSound.Checked Then PlaySound App.Path & "\Choose.wav"
  833.         sLetter = lblLetter(Index).Caption
  834.         If InStr(1, sWord, sLetter, 1) <> 0 Then
  835.             DummyWord = txtWord.Caption
  836.             For i = 1 To Len(sWord)
  837.                 If UCase(Mid(sWord, i, 1)) = sLetter Then
  838.                     txtWord.ForeColor = &H6F&
  839.                     Mid(DummyWord, (i * 2 - 1), 1) = sLetter
  840.                 End If
  841.             Next i
  842.             txtWord.Caption = DummyWord
  843.             If InStr(1, DummyWord, "_") = 0 Then
  844.                 iResponse = MsgBox("You win!!", vbOKOnly + vbInformation, frmHangman.Caption)
  845.                 iGamesWon = iGamesWon + 1
  846.                 GamesWon.Text = "Games Won: " & iGamesWon
  847.                 GamesLost.Text = "Games Lost: " & iGamesLost
  848.                 bGameStarted = False
  849.                 mnuNew.Enabled = True
  850.                 Call subNewGame
  851.             End If
  852.         Else
  853.             Select Case iGameStage
  854.                 '###########################
  855.                 Case 0
  856.                     HangBase.Visible = True
  857.                     iGameStage = 1
  858.                 Case 1
  859.                     HangVer.Visible = True
  860.                     iGameStage = 2
  861.                 Case 2
  862.                     HangHor.Visible = True
  863.                     iGameStage = 3
  864.                 Case 3
  865.                     HangAng.Visible = True
  866.                     iGameStage = 4
  867.                 '###########################
  868.                 Case 4
  869.                     Rope.Visible = True
  870.                     iGameStage = 5
  871.                 Case 5
  872.                     Head.Visible = True
  873.                     iGameStage = 6
  874.                 Case 6
  875.                     Body.Visible = True
  876.                     iGameStage = 7
  877.                 Case 7
  878.                     LLeg.Visible = True
  879.                     iGameStage = 8
  880.                 Case 8
  881.                     RLeg.Visible = True
  882.                     iGameStage = 9
  883.                 Case 9
  884.                     LArm.Visible = True
  885.                     iGameStage = 10
  886.                 Case 10
  887.                     RArm.Visible = True
  888.                     iGameStage = 11
  889.                     For i = 1 To Len(sWord)
  890.                         DummyWord = DummyWord & UCase(Mid(sWord, i, 1)) & " "
  891.                     Next i
  892.                     txtWord.Caption = DummyWord
  893.                     txtWord.ForeColor = &HFF&
  894.                     iResponse = MsgBox("You lose!", vbOKOnly + vbInformation, frmHangman.Caption)
  895.                     iGamesLost = iGamesLost + 1
  896.                     GamesWon.Text = "Games Won: " & iGamesWon
  897.                     GamesLost.Text = "Games Lost: " & iGamesLost
  898.                     bGameStarted = False
  899.                     mnuNew.Enabled = True
  900.                     Call subNewGame
  901.             End Select
  902.         End If
  903.     End If
  904. Exit Sub
  905. Produce_Error:
  906.     iResponse = MsgBox("Error Number " & Err.Number & " - " & Err.Description & ".", vbOKOnly + vbExclamation, frmHangman.Caption)
  907. End Sub
  908. Private Sub subLoadFile()
  909.     Dim iFileNum As Integer
  910.     Dim i As Integer
  911.     Dim sString As String
  912.     On Error GoTo Produce_Error
  913.     bGameStarted = False
  914.     iFileNum = FreeFile()
  915.     Open App.Path & "\words.txt" For Input As #iFileNum
  916.     i = 0
  917.     While Not EOF(iFileNum)
  918.         Input #iFileNum, sString
  919.         i = i + 1
  920.     Wend
  921.     iNumOfWords = i
  922.     ReDim sWords(iNumOfWords, 2)
  923.     Close #iFileNum
  924.     iFileNum = FreeFile()
  925.     Open App.Path & "\words.txt" For Input As #iFileNum
  926.     i = 0
  927.     While Not EOF(iFileNum)
  928.         Input #iFileNum, sWords(i, 0)
  929.         i = i + 1
  930.     Wend
  931.     Close #iFileNum
  932.     GamesWon.Text = "Games Won: " & iGamesWon
  933.     GamesLost.Text = "Games Lost: " & iGamesLost
  934.     Exit Sub
  935. Produce_Error:
  936.     If Err.Number = 53 Then
  937.         iResponse = MsgBox("Cannot find the file words.hmf, which contains the words for this game.  It should be in the same directory as the Hangman.exe.", vbOKOnly + vbExclamation, frmHangman.Caption)
  938.     Else
  939.         iResponse = MsgBox("Error Number " & Err.Number & " - " & Err.Description & ".", vbOKOnly + vbExclamation, frmHangman.Caption)
  940.     End If
  941. End Sub
  942. Private Sub PlaySound(strSound As String)
  943.     'If mnuSound.Checked Then PlaySound App.Path & "\BallLaunch.wav"
  944.     sndPlaySound strSound, SND_ASYNC Or SND_NODEFAULT
  945. End Sub
  946.