?? tepedform.frm
字號(hào):
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
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 = "所打字符數(shù):"
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 = "正確字符數(shù)(個(gè)):"
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 = "字符總數(shù)(個(gè)):"
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 = "打字練習(xí)"
Begin VB.Menu start_type
Caption = "開始練習(xí)"
End
Begin VB.Menu select
Caption = "練習(xí)文章選擇"
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 = "關(guān)于"
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 '字符總數(shù)
Dim char_ke As Integer
Dim char_percent As Integer '字符正確數(shù)(%)
Dim current_char As Integer '當(dāng)前所打字符數(shù)
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 "您打字練習(xí)的正確率為:" & Str(char_percent), 64, "正確率顯示!!"
Else
MsgBox "打字練習(xí)還未開始!", 64, "請(qǐng)開始打字練習(xí)"
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 '字符總數(shù)
rignt_char = 0 '正確字符數(shù)
current_char = 0 '當(dāng)前所打字符數(shù)
Line1.Visible = False
End Sub
'反會(huì)主界面
Private Sub return_main_Click()
Me.Hide
'Unload tepedtestForm
mainForm.Show
Line1.Visible = False
End Sub
'當(dāng)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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -