www.pudn.com > vb_game.rar > Form2.frm


VERSION 5.00 
Begin VB.Form Form2  
   Caption         =   "游戏高手记录" 
   ClientHeight    =   2085 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   4680 
   LinkTopic       =   "Form2" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   2085 
   ScaleWidth      =   4680 
   StartUpPosition =   1  '所有者中心 
   Begin VB.CommandButton Command2  
      Caption         =   "确定" 
      Height          =   350 
      Left            =   3600 
      TabIndex        =   5 
      Top             =   1680 
      Width           =   855 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "重新记分(&R)" 
      Height          =   350 
      Left            =   2160 
      TabIndex        =   4 
      Top             =   1680 
      Width           =   1215 
   End 
   Begin VB.Label Label4  
      Caption         =   "匿名" 
      Height          =   180 
      Index           =   1 
      Left            =   3240 
      TabIndex        =   11 
      Top             =   1200 
      Width           =   540 
   End 
   Begin VB.Label Label3  
      Caption         =   "匿名" 
      Height          =   180 
      Index           =   1 
      Left            =   3240 
      TabIndex        =   10 
      Top             =   840 
      Width           =   540 
   End 
   Begin VB.Label Label2  
      AutoSize        =   -1  'True 
      Caption         =   "匿名" 
      Height          =   180 
      Index           =   1 
      Left            =   3240 
      TabIndex        =   9 
      Top             =   480 
      Width           =   360 
   End 
   Begin VB.Label Label4  
      AutoSize        =   -1  'True 
      Caption         =   "999999步" 
      Height          =   180 
      Index           =   0 
      Left            =   2040 
      TabIndex        =   8 
      Top             =   1200 
      Width           =   720 
   End 
   Begin VB.Label Label3  
      AutoSize        =   -1  'True 
      Caption         =   "999999步" 
      Height          =   180 
      Index           =   0 
      Left            =   2040 
      TabIndex        =   7 
      Top             =   840 
      Width           =   720 
   End 
   Begin VB.Label Label2  
      AutoSize        =   -1  'True 
      Caption         =   "999999步" 
      Height          =   180 
      Index           =   0 
      Left            =   2040 
      TabIndex        =   6 
      Top             =   480 
      Width           =   720 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      Caption         =   "高级:" 
      Height          =   180 
      Index           =   3 
      Left            =   480 
      TabIndex        =   3 
      Top             =   1200 
      Width           =   450 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      Caption         =   "中级:" 
      Height          =   180 
      Index           =   2 
      Left            =   480 
      TabIndex        =   2 
      Top             =   840 
      Width           =   450 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      Caption         =   "初级:" 
      Height          =   180 
      Index           =   1 
      Left            =   480 
      TabIndex        =   1 
      Top             =   480 
      Width           =   450 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      Caption         =   "追星榜" 
      Height          =   180 
      Index           =   0 
      Left            =   360 
      TabIndex        =   0 
      Top             =   160 
      Width           =   540 
   End 
   Begin VB.Shape Shape1  
      BorderColor     =   &H00FFFFFF& 
      FillColor       =   &H00FFFFFF& 
      Height          =   1335 
      Left            =   120 
      Shape           =   4  'Rounded Rectangle 
      Top             =   240 
      Width           =   4455 
   End 
End 
Attribute VB_Name = "Form2" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
Dim filename(1 To 3), m, n, Line_text As String 
Private Sub Command1_Click() 
If filename(1) <> "" Then Kill " 1.txt" 
If filename(2) <> "" Then Kill " 2.txt" 
If filename(3) <> "" Then Kill " 3.txt" 
Label2(0).Caption = "999999步" 
Label3(0).Caption = "999999步" 
Label4(0).Caption = "999999步" 
Label2(1).Caption = "匿名" 
Label3(1).Caption = "匿名" 
Label4(1).Caption = "匿名" 
End Sub 
Private Sub Command2_Click() 
 Form1.Enabled = True 
 Unload Me 
End Sub 
Private Sub Form_Load() 
filename(1) = Dir(" 1.txt") 
filename(2) = Dir(" 2.txt") 
filename(3) = Dir(" 3.txt") 
If filename(1) <> "" Then 
Open filename(1) For Input As #1 
Line Input #1, Line_text 
m = Left(Line_text, InStr(1, Line_text, "!") - 1) 
n = Right(Line_text, InStr(1, Line_text, "!")) 
Close #1 
Label2(0).Caption = m + "步" 
Label2(1).Caption = n 
End If 
If filename(2) <> "" Then 
Open filename(2) For Input As #1 
Line Input #1, Line_text 
m = Left(Line_text, InStr(1, Line_text, "!") - 1) 
n = Right(Line_text, InStr(1, Line_text, "!")) 
Close #1 
Label3(0).Caption = m + "步" 
Label3(1).Caption = n 
End If 
If filename(3) <> "" Then 
Open filename(3) For Input As #1 
Line Input #1, Line_text 
m = Left(Line_text, InStr(1, Line_text, "!") - 1) 
n = Right(Line_text, InStr(1, Line_text, "!")) 
Close #1 
Label4(0).Caption = m + "步" 
Label4(1).Caption = n 
End If 
End Sub