Form2.frm
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:8k
- VERSION 5.00
- Begin VB.Form Form2
- BorderStyle = 1 'Fixed Single
- Caption = "速度五笔编码管理"
- ClientHeight = 2610
- ClientLeft = 45
- ClientTop = 435
- ClientWidth = 4170
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2610
- ScaleWidth = 4170
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton Command3
- Caption = "<<"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 435
- Left = 1920
- TabIndex = 8
- Top = 420
- Width = 615
- End
- Begin VB.TextBox Text3
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 2550
- TabIndex = 6
- Top = 390
- Width = 1515
- End
- Begin VB.CommandButton Command2
- Caption = "上一记录"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 120
- TabIndex = 5
- Top = 1830
- Width = 1215
- End
- Begin VB.CommandButton Command1
- Caption = "下一记录"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 2370
- TabIndex = 4
- Top = 1830
- Width = 1215
- End
- Begin VB.TextBox Text2
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 525
- Left = 120
- TabIndex = 1
- Top = 1260
- Width = 3975
- End
- Begin VB.TextBox Text1
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 465
- Left = 120
- TabIndex = 0
- Top = 420
- Width = 1695
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 120
- TabIndex = 9
- Top = 2250
- Width = 3945
- End
- Begin VB.Label Label3
- Caption = "系统参考编码"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 2550
- TabIndex = 7
- Top = 60
- Width = 1515
- End
- Begin VB.Label Label2
- Caption = "汉字字符"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 120
- TabIndex = 3
- Top = 930
- Width = 1035
- End
- Begin VB.Label Label1
- Caption = "汉字编码"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 300
- TabIndex = 2
- Top = 60
- Width = 1035
- End
- End
- Attribute VB_Name = "Form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim CurR As Long
- Private Sub Command1_Click()
- Dim r As Long
- CurR = CurR + 1
- r = form1.MSFlexGrid1.Rows
- If (CurR >= r - 1) Then
- CurR = r - 1
- End If
- Form2.Text1.Text = form1.MSFlexGrid1.TextMatrix(CurR, 1)
- Form2.Text2.Text = form1.MSFlexGrid1.TextMatrix(CurR, 2)
- End Sub
- Sub SetCurR(r As Long)
- CurR = r
- End Sub
- Private Sub Command2_Click()
- CurR = CurR - 1
- If (CurR < 1) Then
- CurR = 1
- End If
- Form2.Text1.Text = form1.MSFlexGrid1.TextMatrix(CurR, 1)
- Form2.Text2.Text = form1.MSFlexGrid1.TextMatrix(CurR, 2)
- End Sub
- Private Sub Command3_Click()
- Text1.Text = Text3.Text
- form1.MSFlexGrid1.TextMatrix(CurR, 3) = ""
- Text1.BackColor = &H80000005
- End Sub
- Private Sub Text1_Change()
- form1.MSFlexGrid1.TextMatrix(CurR, 1) = LCase(Form2.Text1.Text)
- End Sub
- Private Sub Text1_KeyPress(KeyAscii As Integer)
- If (KeyAscii < 0 Or KeyAscii = 32) Then
- KeyAscii = 0
- End If
- End Sub
- Private Sub Text2_Change()
- Dim ss As String, temss As String
- form1.MSFlexGrid1.TextMatrix(CurR, 2) = Text2.Text
-
- ss = " "
- temss = Text2.Text
- ChissToCode App.path & "MainCode.txt", temss, ss
- Text3.Text = LCase(ss)
- Text1.Text = LCase(Text1.Text)
-
- If (Trim(Text1.Text) = Trim(Text3.Text)) Then
- form1.MSFlexGrid1.TextMatrix(CurR, 3) = ""
- Text1.BackColor = &H80000005
- Else
- Text1.BackColor = vbRed
- form1.MSFlexGrid1.TextMatrix(CurR, 3) = "****"
- End If
-
- End Sub
- Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
- If (KeyCode = 13) Then
- Form2.Visible = False
- End If
-
- End Sub
- Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
- If (KeyCode = 13) Then
- Form2.Visible = False
- End If
- End Sub
- Private Sub Text2_KeyPress(KeyAscii As Integer)
- Label4.Caption = "注意:空格、“;”和0x--为特殊字符"
- If (KeyAscii = 32) Then
- sendss "0x20"
- KeyAscii = 0
- Label4.Caption = "系统已将“空格”进行了转换"
- End If
-
- If (KeyAscii = 59) Then
- sendss "0x3b"
- KeyAscii = 0
- Label4.Caption = "系统已将“;”进行了转换"
- End If
-
- End Sub
- Sub sendss(ss As String)
- Dim i As Long
- Dim c As Long
- Dim temss As String
- For i = 1 To Len(ss)
- temss = Left(ss, i)
- c = Asc(Right(temss, 1))
- SendMessage GetFocus(), WM_CHAR, c, 0
- Next i
-
- End Sub