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

📄 tepedform.frm

📁 一个简单的打字练习东东
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form tepedtestForm 
   Caption         =   "谢祖荣打字王"
   ClientHeight    =   7785
   ClientLeft      =   165
   ClientTop       =   765
   ClientWidth     =   9675
   Icon            =   "tepedForm.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   519
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   645
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   7320
      TabIndex        =   12
      Top             =   7320
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "正确率"
      Height          =   375
      Left            =   7320
      TabIndex        =   9
      Top             =   6960
      Width           =   1215
   End
   Begin VB.PictureBox Picture2 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   9360
      ScaleHeight     =   315
      ScaleWidth      =   315
      TabIndex        =   3
      Top             =   7200
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.PictureBox Picture1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   6135
      Left            =   0
      ScaleHeight     =   405
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   637
      TabIndex        =   1
      Top             =   720
      Width           =   9615
      Begin RichTextLib.RichTextBox RichTextBox1 
         Height          =   375
         Index           =   0
         Left            =   8160
         TabIndex        =   4
         Top             =   5640
         Visible         =   0   'False
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         _Version        =   393217
         BackColor       =   16777215
         Enabled         =   -1  'True
         Appearance      =   0
         TextRTF         =   $"tepedForm.frx":08CA
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.Line Line1 
         BorderWidth     =   2
         Visible         =   0   'False
         X1              =   16
         X2              =   32
         Y1              =   400
         Y2              =   400
      End
      Begin VB.Label Label1 
         Caption         =   "Label1"
         Height          =   375
         Index           =   0
         Left            =   240
         TabIndex        =   2
         Top             =   5280
         Width           =   1095
      End
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   660
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   9675
      _ExtentX        =   17066
      _ExtentY        =   1164
      ButtonWidth     =   1032
      ButtonHeight    =   1005
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   2
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "start"
            Object.ToolTipText     =   """开始游戏"""
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "help"
            Object.ToolTipText     =   """帮助"""
            ImageIndex      =   2
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   120
      Top             =   5520
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   2
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "tepedForm.frx":0964
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "tepedForm.frx":0C7E
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Image Image1 
      Height          =   690
      Left            =   8640
      Picture         =   "tepedForm.frx":2B00
      Top             =   6960
      Width           =   660
   End
   Begin VB.Label Label7 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3600
      TabIndex        =   11
      Top             =   7200
      Width           =   855
   End
   Begin VB.Label Label6 
      Caption         =   "所打字符数:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2280
      TabIndex        =   10
      Top             =   7200
      Width           =   1095
   End
   Begin VB.Label Label5 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6240
      TabIndex        =   8
      Top             =   7200
      Width           =   615
   End
   Begin VB.Label Label4 
      Caption         =   "正确字符数(个):"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4560
      TabIndex        =   7
      Top             =   7200
      Width           =   1455
   End
   Begin VB.Label Label3 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1440
      TabIndex        =   6
      Top             =   7200
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "字符总数(个):"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   7200
      Width           =   1215
   End
   Begin VB.Menu menu_typetest 
      Caption         =   "打字练习"
      Begin VB.Menu start_type 
         Caption         =   "开始练习"
      End
      Begin VB.Menu select 
         Caption         =   "练习文章选择"
      End
      Begin VB.Menu return_main 
         Caption         =   "主界面"
      End
      Begin VB.Menu exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu menu_help 
      Caption         =   "帮助"
      Begin VB.Menu about 
         Caption         =   "关于"
      End
   End
End
Attribute VB_Name = "tepedtestForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const ROWCOUNT = 5
Dim char_total As Integer '字符总数
Dim char_ke As Integer
Dim char_percent As Integer '字符正确数(%)
Dim current_char As Integer '当前所打字符数

Private Sub about_Click()
frmAbout.Show
End Sub

'显示正确率
Private Sub Command1_Click()
 If char_total <> 0 Then
 char_percent = (rignt_char / char_total) * 100
 MsgBox "您打字练习的正确率为:" & Str(char_percent), 64, "正确率显示!!"
 Else
  MsgBox "打字练习还未开始!", 64, "请开始打字练习"
 End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Label1(0).Caption = ""
Label1(0).Visible = False
mode = False
scrapname = "girl.txt"
mode_label = False
Me.Show

Picture2.Print "M"
fontwidth = Picture1.TextWidth("M") - 2
'Debug.Print fontwidth
char_len = 1
char_total = 0 '字符总数
rignt_char = 0 '正确字符数
current_char = 0 '当前所打字符数
 Line1.Visible = False
End Sub






'反会主界面
Private Sub return_main_Click()
 Me.Hide
 'Unload tepedtestForm
 mainForm.Show
 Line1.Visible = False
End Sub
'当RichTextBox1控件的文本改变是就判断所打字符是否正确
Private Sub RichTextBox1_Change(Index As Integer)

Select Case Index
Case 1 '控制打字的第一横字符
'Debug.Print Mid(RichTextBox1(Index).Text, char_len, 1)
' MsgBox "abc"
 If (Mid(RichTextBox1(Index).Text, char_len, 1) = _
     Mid(Label1(Index).Caption, char_len, 1)) Then '正确字符
     RichTextBox1(Index).SelStart = char_len - 1
   
     RichTextBox1(Index).SelLength = 1
     RichTextBox1(Index).SelColor = vbBlue

⌨️ 快捷键说明

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