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

📄 module1.bas

📁 疯狂五笔打字
💻 BAS
📖 第 1 页 / 共 2 页
字号:
Attribute VB_Name = "Module1"
Public Letter As Integer
Public Choice As Integer
Dim I As Integer
Dim Xrnd As Integer
Dim StrC As String
Dim XY As Integer
Public ReadText As String
Public SRead As String
Public LenStr As Integer
Public OneCode(24) As String
Dim TwoCode() As String
Public dbRed As New Recordset
Public dbCon As New ADODB.Connection
Public StrSql As String
Public Countred As Integer
Public EABC(52) As String
Public CEL As Integer
Public FormWidth As Integer
Public FormHeight As Integer
Public TSE, TSR, TSW As Integer
Public WordE, WordR, WordS As Integer
Public CountE As Integer
Public CountR As Integer
Public SWord As Integer
Public UserStr As String
Public g_dbcon As New ADODB.Connection
Public g_dbred As New Recordset
Public Test As Integer
Public Msg As Integer
Public Sub RndABC() '载入文本信息
    FrmMain.LblErrar.Caption = "错误:" & CountE
    FrmMain.LblRight.Caption = "正确:" & CountR
    For I = 0 To 6
        Select Case I
            Case 0
                M1
            Case 1
                M2
            Case 2
                M3
            Case 3
                M4
            Case 4
                M5
            Case 5
                M6
            Case 6
                M7
        End Select
    Next I
End Sub
Sub M1() '载入第1行文本
    If Letter = 3 And Choice = 1 Then
        FrmMain.LblText1(0).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
    End If
'    If Letter = 2 And Choice = 0 Then
'        FrmMain.LblText1(0).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'    End If
    If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
        FrmMain.LblText1(0).Caption = TwoCode(Int(Rnd * Countred))
    End If
    If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
        FrmMain.LblText1(0).Caption = Mid(ReadText, LenStr, 1)
        LenStr = LenStr + 1
    End If
    If Letter = 1 And Choice = 1 Then
        FrmMain.LblText1(0).Caption = EABC(Int(Rnd * 53))
    End If
    XY = 1
    Xrnd = 30 + (FrmMain.LblText1(0).Width)
    While (Xrnd <= (FrmMain.PicDispaly(0).Width - 200))
        Load FrmMain.LblText1(XY)
        FrmMain.LblText1(XY).Visible = True
        FrmMain.LblText1(XY).Left = Xrnd
        If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then '载入须序文本
            StrC = Mid(ReadText, LenStr, 1)
            FrmMain.LblText1(XY).Caption = StrC
            LenStr = LenStr + 1
        End If
        If Letter = 3 And Choice = 1 Then '载入一级简码
            FrmMain.LblText1(XY).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
        End If
'        If Letter = 2 And Choice = 0 Then '载入字根
'            FrmMain.LblText1(XY).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'        End If
        If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then '载入二、三、全码汉字
            FrmMain.LblText1(XY).Caption = TwoCode(Int(Rnd * Countred))
        End If
        If Letter = 1 And Choice = 1 Then '载入随机字母
            FrmMain.LblText1(XY).Caption = EABC(Int(Rnd * 53))
        End If
        Xrnd = Xrnd + FrmMain.LblText1(XY).Width
        XY = XY + 1
    Wend
    FrmMain.TxtInput(I).MaxLength = XY
End Sub

Sub M2() '载入第2行文本
    If Letter = 3 And Choice = 1 Then
        FrmMain.LblText2(0).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
    End If
'    If Letter = 2 And Choice = 0 Then
'        FrmMain.LblText2(0).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'    End If
    If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
        FrmMain.LblText2(0).Caption = TwoCode(Int(Rnd * Countred))
    End If
    If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
        FrmMain.LblText2(0).Caption = Mid(ReadText, LenStr, 1)
        LenStr = LenStr + 1
    End If
    If Letter = 1 And Choice = 1 Then
        FrmMain.LblText2(0).Caption = EABC(Int(Rnd * 53))
    End If
    XY = 1
    Xrnd = 30 + (FrmMain.LblText2(0).Width)
    While (Xrnd <= (FrmMain.PicDispaly(0).Width - 200))
        Load FrmMain.LblText2(XY)
        FrmMain.LblText2(XY).Visible = True
        FrmMain.LblText2(XY).Left = Xrnd
        If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
            StrC = Mid(ReadText, LenStr, 1)
            FrmMain.LblText2(XY).Caption = StrC
            LenStr = LenStr + 1
        End If
        If Letter = 3 And Choice = 1 Then
            FrmMain.LblText2(XY).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
        End If
'        If Letter = 2 And Choice = 0 Then
'            FrmMain.LblText2(XY).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'        End If
        If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
            FrmMain.LblText2(XY).Caption = TwoCode(Int(Rnd * Countred))
        End If
        If Letter = 1 And Choice = 1 Then
            FrmMain.LblText2(XY).Caption = EABC(Int(Rnd * 53))
        End If
        Xrnd = Xrnd + FrmMain.LblText2(XY).Width
        XY = XY + 1
    Wend
    FrmMain.TxtInput(I).MaxLength = XY
End Sub
Sub M3() '载入第3行文本
    If Letter = 3 And Choice = 1 Then
        FrmMain.LblText3(0).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
    End If
'    If Letter = 2 And Choice = 0 Then
'        FrmMain.LblText3(0).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'    End If
    If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
        FrmMain.LblText3(0).Caption = TwoCode(Int(Rnd * Countred))
    End If
    If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
        FrmMain.LblText3(0).Caption = Mid(ReadText, LenStr, 1)
        LenStr = LenStr + 1
    End If
    If Letter = 1 And Choice = 1 Then
        FrmMain.LblText3(0).Caption = EABC(Int(Rnd * 53))
    End If
    XY = 1
    Xrnd = 30 + (FrmMain.LblText3(0).Width)
    While (Xrnd <= (FrmMain.PicDispaly(0).Width - 200))
        Load FrmMain.LblText3(XY)
        FrmMain.LblText3(XY).Visible = True
        FrmMain.LblText3(XY).Left = Xrnd
        If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
            StrC = Mid(ReadText, LenStr, 1)
            FrmMain.LblText3(XY).Caption = StrC
            LenStr = LenStr + 1
        End If
        If Letter = 3 And Choice = 1 Then
            FrmMain.LblText3(XY).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
        End If
'        If Letter = 2 And Choice = 0 Then
'            FrmMain.LblText3(XY).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'        End If
        If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
            FrmMain.LblText3(XY).Caption = TwoCode(Int(Rnd * Countred))
        End If
        If Letter = 1 And Choice = 1 Then
            FrmMain.LblText3(XY).Caption = EABC(Int(Rnd * 53))
        End If
        Xrnd = Xrnd + FrmMain.LblText3(XY).Width
        XY = XY + 1
    Wend
    FrmMain.TxtInput(I).MaxLength = XY
End Sub
Sub M4() '载入第4行文本
    If Letter = 3 And Choice = 1 Then
        FrmMain.LblText4(0).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
    End If
'    If Letter = 2 And Choice = 0 Then
'        FrmMain.LblText4(0).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'    End If
    If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
        FrmMain.LblText4(0).Caption = TwoCode(Int(Rnd * Countred))
    End If
    If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
        FrmMain.LblText4(0).Caption = Mid(ReadText, LenStr, 1)
        LenStr = LenStr + 1
    End If
    If Letter = 1 And Choice = 1 Then
        FrmMain.LblText4(0).Caption = EABC(Int(Rnd * 53))
    End If
    XY = 1
    Xrnd = 30 + (FrmMain.LblText4(0).Width)
    While (Xrnd <= (FrmMain.PicDispaly(0).Width - 200))
        Load FrmMain.LblText4(XY)
        FrmMain.LblText4(XY).Visible = True
        FrmMain.LblText4(XY).Left = Xrnd
        If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
            StrC = Mid(ReadText, LenStr, 1)
            FrmMain.LblText4(XY).Caption = StrC
            LenStr = LenStr + 1
        End If
        If Letter = 3 And Choice = 1 Then
            FrmMain.LblText4(XY).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
        End If
'        If Letter = 2 And Choice = 0 Then
'            FrmMain.LblText4(XY).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'        End If
        If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
            FrmMain.LblText4(XY).Caption = TwoCode(Int(Rnd * Countred))
        End If
        If Letter = 1 And Choice = 1 Then
            FrmMain.LblText4(XY).Caption = EABC(Int(Rnd * 53))
        End If
        Xrnd = Xrnd + FrmMain.LblText4(XY).Width
        XY = XY + 1
    Wend
    FrmMain.TxtInput(I).MaxLength = XY
End Sub
Sub M5() '载入第5行文本
    If Letter = 3 And Choice = 1 Then
        FrmMain.LblText5(0).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
    End If
'    If Letter = 2 And Choice = 0 Then
'        FrmMain.LblText5(0).Caption = Mid(Head(Int(Rnd * 177)), 1, 1)
'    End If
    If Letter = 3 And (Choice = 2 Or Choice = 3 Or Choice = 4) Then
        FrmMain.LblText5(0).Caption = TwoCode(Int(Rnd * Countred))
    End If
    If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
        FrmMain.LblText5(0).Caption = Mid(ReadText, LenStr, 1)
        LenStr = LenStr + 1
    End If
    If Letter = 1 And Choice = 1 Then
        FrmMain.LblText5(0).Caption = EABC(Int(Rnd * 53))
    End If
    XY = 1
    Xrnd = 30 + (FrmMain.LblText5(0).Width)
    While (Xrnd <= (FrmMain.PicDispaly(0).Width - 200))
        Load FrmMain.LblText5(XY)
        FrmMain.LblText5(XY).Visible = True
        FrmMain.LblText5(XY).Left = Xrnd
        If (Letter = 1 And Choice = 2) Or Letter = 4 Or Letter = 5 Then
            StrC = Mid(ReadText, LenStr, 1)
            FrmMain.LblText5(XY).Caption = StrC
            LenStr = LenStr + 1
        End If
        If Letter = 3 And Choice = 1 Then
            FrmMain.LblText5(XY).Caption = Mid(OneCode(Int(Rnd * 25)), 1, 1)
        End If

⌨️ 快捷键说明

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