home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD49714192000.psc / frmStartUp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-04-18  |  5.4 KB  |  192 lines

  1. VERSION 5.00
  2. Begin VB.Form frmStartUp 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Death By Tank"
  5.    ClientHeight    =   3540
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   2655
  9.    ClipControls    =   0   'False
  10.    Icon            =   "frmStartUp.frx":0000
  11.    LinkTopic       =   "Form3"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   3540
  15.    ScaleWidth      =   2655
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton cmdView 
  18.       Caption         =   "View Top 10"
  19.       Height          =   375
  20.       Left            =   0
  21.       TabIndex        =   10
  22.       Top             =   2640
  23.       Width           =   2655
  24.    End
  25.    Begin VB.OptionButton optEasy 
  26.       Caption         =   "Wimp"
  27.       Height          =   255
  28.       Left            =   720
  29.       TabIndex        =   9
  30.       Top             =   720
  31.       Width           =   1215
  32.    End
  33.    Begin VB.OptionButton optHard 
  34.       Caption         =   "Game Over"
  35.       Height          =   255
  36.       Left            =   720
  37.       TabIndex        =   8
  38.       Top             =   1320
  39.       Width           =   1215
  40.    End
  41.    Begin VB.OptionButton optMedium 
  42.       Caption         =   "Quick Death"
  43.       Height          =   255
  44.       Left            =   720
  45.       TabIndex        =   7
  46.       Top             =   1015
  47.       Value           =   -1  'True
  48.       Width           =   1215
  49.    End
  50.    Begin VB.CommandButton cmdExit 
  51.       Caption         =   "Exit"
  52.       Height          =   375
  53.       Left            =   0
  54.       TabIndex        =   5
  55.       Top             =   3120
  56.       Width           =   1095
  57.    End
  58.    Begin VB.CommandButton cmdStart 
  59.       Caption         =   "Begin!"
  60.       Height          =   375
  61.       Left            =   1560
  62.       TabIndex        =   4
  63.       Top             =   3120
  64.       Width           =   1095
  65.    End
  66.    Begin VB.Frame Frame1 
  67.       Caption         =   "How Do You Want To Die?"
  68.       Height          =   2460
  69.       Left            =   0
  70.       TabIndex        =   0
  71.       Top             =   120
  72.       Width           =   2655
  73.       Begin VB.Frame Frame2 
  74.          BorderStyle     =   0  'None
  75.          Caption         =   "Frame2"
  76.          Height          =   735
  77.          Left            =   480
  78.          TabIndex        =   6
  79.          Top             =   600
  80.          Width           =   1575
  81.       End
  82.       Begin VB.OptionButton optSingle 
  83.          Caption         =   "Single Player"
  84.          Height          =   375
  85.          Left            =   360
  86.          TabIndex        =   1
  87.          Top             =   240
  88.          Value           =   -1  'True
  89.          Width           =   2055
  90.       End
  91.       Begin VB.OptionButton optMultiNet 
  92.          Caption         =   "Multi-Player Internet"
  93.          Height          =   375
  94.          Left            =   360
  95.          TabIndex        =   3
  96.          Top             =   1800
  97.          Width           =   1695
  98.       End
  99.       Begin VB.OptionButton optMultiKey 
  100.          Caption         =   "Multi-Player Keyboard"
  101.          Height          =   375
  102.          Left            =   360
  103.          TabIndex        =   2
  104.          Top             =   1440
  105.          Width           =   2055
  106.       End
  107.    End
  108. Attribute VB_Name = "frmStartUp"
  109. Attribute VB_GlobalNameSpace = False
  110. Attribute VB_Creatable = False
  111. Attribute VB_PredeclaredId = True
  112. Attribute VB_Exposed = False
  113. Private Type ScoreType
  114.     Name As String
  115.     Points As Long
  116. End Type
  117. Private Sub cmdStart_Click()
  118. Unload frmScores
  119. If optSingle.Value = True Then
  120.     GameType = "Single"
  121.     If optEasy.Value = True Then
  122.         frmPlay.Timer2.Interval = 500
  123.     ElseIf optMedium.Value = True Then
  124.         frmPlay.Timer2.Interval = 375
  125.     Else
  126.         frmPlay.Timer2.Interval = 1
  127.     End If
  128.     frmPlay.Show
  129. ElseIf optMultiKey.Value = True Then
  130.     GameType = "Key"
  131.     frmPlay.Show
  132. ElseIf optMultiNet.Value = True Then
  133.     GameType = "Net"
  134.     frmPlay.Show
  135. End If
  136. Unload Me
  137. End Sub
  138. Private Sub cmdView_Click()
  139.     frmScores.Show
  140. End Sub
  141. Private Sub CmdExit_Click()
  142.     End
  143. End Sub
  144. Private Sub Form_Load()
  145. Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
  146. If Dir(App.Path & "\Ts.ini") = "" Then
  147.     Dim file As String
  148.     Dim Scores(1 To 10) As ScoreType
  149.     Scores(1).Name = "Chris"
  150.     Scores(1).Points = 1000000
  151.     Scores(2).Name = "Allison"
  152.     Scores(2).Points = 975000
  153.     Scores(3).Name = "Jeff"
  154.     Scores(3).Points = 932000
  155.     Scores(4).Name = "Chad"
  156.     Scores(4).Points = 905000
  157.     Scores(5).Name = "Jeremy"
  158.     Scores(5).Points = 890000
  159.     Scores(6).Name = "Aaron"
  160.     Scores(6).Points = 800000
  161.     Scores(7).Name = "Deeds"
  162.     Scores(7).Points = 755000
  163.     Scores(8).Name = "Anna"
  164.     Scores(8).Points = 700000
  165.     Scores(9).Name = "Coolio"
  166.     Scores(9).Points = 675000
  167.     Scores(10).Name = "J. Benson"
  168.     Scores(10).Points = 10
  169.     file = App.Path & "\Ts.ini"
  170.     Open file For Random As #1
  171.     For X = 1 To 10
  172.         Put 1, X, Scores(X)
  173.     Next X
  174.     Close #1
  175. End If
  176. End Sub
  177. Private Sub optMultiKey_Click()
  178. optEasy.Enabled = False
  179. optMedium.Enabled = False
  180. optHard.Enabled = False
  181. End Sub
  182. Private Sub optMultiNet_Click()
  183. optEasy.Enabled = False
  184. optMedium.Enabled = False
  185. optHard.Enabled = False
  186. End Sub
  187. Private Sub optSingle_Click()
  188. optEasy.Enabled = True
  189. optMedium.Enabled = True
  190. optHard.Enabled = True
  191. End Sub
  192.