?? module1.bas
字號:
Attribute VB_Name = "Module1"
'定義全局變量
Const MAXROW_COUNT = 5
Public ROWCOUNT As Integer '練習的字符行數
Public tatalchar As Integer '練習字符總個數
Public playsec As Integer '所用時間
Public mode As Boolean '打字狀態
Public mode_label As Boolean
Public scrapname As String
Public deforescrapname As String
Public fontwidth As Integer
Public char_len As Integer '記錄每橫字符長度
Public rignt_char As Integer '正確字符個數
Public type_time As Long '打字測試的打字時間(默認為1分鐘)
Public type_right As Integer '打字測試的正確字符數
Public type_allchar As Integer '打字測試的的總數
Public type_percent As Integer '計算正確率
Public type_show As String '顯示打字時間
Public mm As Integer '記錄時間的分鐘
Public ss As Integer ''記錄時間的秒鐘
Public ms As Integer ''記錄時間的毫鐘
'該函數計算打字字符的個數
Public Function all_char() As Integer
Dim current_char As String * 1 '當時要判斷的字符
Dim chartotal As Integer '保存字符總數
chartotal = 0
Dim i As Integer
Dim j As Integer
For i = 1 To MAXROW_COUNT Step 1
For j = 1 To Len(tepedtestForm.Label1(i).Caption) Step 1
'空格不記錄在字符總數
If (Asc(Mid(tepedtestForm.Label1(i).Caption, j, 1)) <> 32) Then
chartotal = chartotal + 1
' MsgBox "fs"
End If
Next j
Next i
all_char = chartotal
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -