⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fhelp.frm

📁 一个用VB编的小游戏
💻 FRM
字号:
VERSION 5.00
Begin VB.Form fHelp 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "帮助"
   ClientHeight    =   3600
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   Icon            =   "fHelp.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   240
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   312
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdWay 
      Caption         =   "Next->"
      Height          =   375
      Index           =   1
      Left            =   3000
      TabIndex        =   5
      Top             =   3120
      Width           =   1335
   End
   Begin VB.CommandButton cmdWay 
      Caption         =   "<-Back"
      Height          =   375
      Index           =   0
      Left            =   1560
      TabIndex        =   4
      Top             =   3120
      Width           =   1335
   End
   Begin VB.PictureBox picTemp 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   735
      Left            =   2520
      ScaleHeight     =   49
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   49
      TabIndex        =   3
      Top             =   1920
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.PictureBox picBack 
      Height          =   2535
      Left            =   120
      ScaleHeight     =   165
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   293
      TabIndex        =   2
      Top             =   480
      Width           =   4455
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "历史背景"
         ForeColor       =   &H00000000&
         Height          =   1980
         Index           =   1
         Left            =   0
         TabIndex        =   7
         Top             =   360
         Width           =   4425
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "历史背景"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   15
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   300
         Index           =   0
         Left            =   15
         TabIndex        =   6
         Top             =   0
         Width           =   4425
      End
   End
   Begin VB.CommandButton cmd 
      Caption         =   "切换到"
      Height          =   375
      Left            =   3720
      TabIndex        =   1
      Top             =   120
      Width           =   855
   End
   Begin VB.ComboBox cmb 
      Height          =   300
      Left            =   120
      Style           =   2  'Dropdown List
      TabIndex        =   0
      Top             =   120
      Width           =   3495
   End
End
Attribute VB_Name = "fHelp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim CurPage As Integer
Private Sub cmb_Click()
CurPage = 0
Call HelpIndex(cmb.ListIndex, 0)
End Sub

Private Sub cmdWay_Click(Index As Integer)
Select Case Index
Case 0
  If CurPage > 0 Then CurPage = CurPage - 1
  Call HelpIndex(cmb.ListIndex, CurPage)
Case 1
  If CurPage < 3 Then CurPage = CurPage + 1
  Call HelpIndex(cmb.ListIndex, CurPage)
End Select
End Sub
Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 - 200
With cmb
  .Clear
  .AddItem "语文/抓作弊"
  .AddItem "英语/默单词"
  .AddItem "数学/发试卷"
  .AddItem "综合/连课时"
  .AddItem "体育/抢篮球"
  .ListIndex = GameSelected - 1
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Select Case GameSelected
Case 1
  fCatch.Enabled = True
Case 2
  fSpell.Enabled = True
Case 3
  fMaths.Enabled = True
Case 4
  fLessons.Enabled = True
Case 5
  fBall.Enabled = True
End Select
End Sub
Public Sub HelpIndex(ByVal Subject As Integer, ByVal Pages As Integer)
Dim temp As String
Open App.Path & "\Help.txt" For Input As #1
Do
  Line Input #1, temp
Loop Until Left(temp, 2) = "[" & Subject
i = 0
Do
  Line Input #1, temp
  If Left(temp, 1) = "!" Then i = i + 1
Loop Until i = Pages + 1
lbl(0).Caption = Mid(temp, 2, Len(temp) - 2)
l = ""
Do
  Line Input #1, temp
  If Left(temp, 1) = "!" Then Exit Do
  l = l & temp & RL
Loop Until EOF(1)
lbl(1).Caption = l
Close #1
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -