frmDataEnv.frm
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:25k
- VERSION 5.00
- Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
- Begin VB.Form form1
- AutoRedraw = -1 'True
- ClientHeight = 7125
- ClientLeft = 165
- ClientTop = 855
- ClientWidth = 9555
- DrawMode = 6 'Mask Pen Not
- FillStyle = 0 'Solid
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 7125
- ScaleWidth = 9555
- StartUpPosition = 3 '窗口缺省
- Begin VB.Frame Frame5
- Caption = "生成编辑文件"
- Height = 615
- Left = 4095
- TabIndex = 22
- Top = 0
- Width = 1755
- Begin VB.TextBox outcodefile
- Height = 360
- Left = 90
- TabIndex = 23
- Top = 180
- Width = 1545
- End
- End
- Begin VB.Frame Frame4
- Caption = "扩展库源码"
- Height = 615
- Left = 2070
- TabIndex = 20
- Top = 0
- Width = 1935
- Begin VB.ComboBox Exdend_code
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- ItemData = "frmDataEnv.frx":0000
- Left = 90
- List = "frmDataEnv.frx":0002
- OLEDropMode = 1 'Manual
- TabIndex = 21
- Top = 180
- Width = 1665
- End
- End
- Begin VB.Frame Frame3
- Caption = "基本库源码"
- Height = 615
- Left = 45
- TabIndex = 18
- Top = 0
- Width = 1935
- Begin VB.ComboBox base_code
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- ItemData = "frmDataEnv.frx":0004
- Left = 90
- List = "frmDataEnv.frx":0006
- OLEDropMode = 1 'Manual
- TabIndex = 19
- Top = 180
- Width = 1665
- End
- End
- Begin VB.Frame Frame2
- Caption = "根据输入查找"
- Height = 615
- Left = 5940
- TabIndex = 11
- Top = 0
- Width = 3480
- Begin VB.TextBox Text1
- Height = 315
- Left = 2430
- TabIndex = 14
- Top = 240
- Width = 975
- End
- Begin VB.TextBox Text2
- Height = 315
- Left = 1350
- TabIndex = 13
- Top = 240
- Width = 645
- End
- Begin VB.TextBox Text3
- Height = 315
- Left = 405
- TabIndex = 12
- Top = 240
- Width = 555
- End
- Begin VB.Label Label2
- Caption = "编码"
- Height = 225
- Left = 990
- TabIndex = 17
- Top = 285
- Width = 495
- End
- Begin VB.Label Label4
- Caption = "汉字"
- Height = 225
- Left = 2025
- TabIndex = 16
- Top = 270
- Width = 375
- End
- Begin VB.Label Label5
- Caption = "序号"
- Height = 225
- Left = 45
- TabIndex = 15
- Top = 300
- Width = 495
- End
- End
- Begin VB.TextBox Text6
- Height = 270
- Left = 120
- TabIndex = 4
- Text = "Text6"
- Top = 5280
- Visible = 0 'False
- Width = 975
- End
- Begin VB.PictureBox Picture1
- BackColor = &H00C0C0FF&
- BorderStyle = 0 'None
- Height = 495
- Left = 0
- ScaleHeight = 495
- ScaleWidth = 11295
- TabIndex = 1
- Top = 5760
- Width = 11295
- Begin VB.Frame Frame1
- Height = 495
- Left = 2760
- TabIndex = 5
- Top = -45
- Width = 4695
- Begin VB.TextBox Text4
- Height = 315
- Left = 1725
- TabIndex = 7
- Top = 150
- Width = 1095
- End
- Begin VB.TextBox Text5
- Height = 315
- Left = 3675
- TabIndex = 6
- Top = 150
- Width = 885
- End
- Begin VB.Label Label8
- Caption = "五笔反查"
- Height = 225
- Left = 150
- TabIndex = 10
- Top = 210
- Width = 825
- End
- Begin VB.Label Label6
- Caption = "生成编码"
- Height = 225
- Left = 2865
- TabIndex = 9
- Top = 210
- Width = 795
- End
- Begin VB.Label Label7
- Caption = "汉字串"
- Height = 225
- Left = 1125
- TabIndex = 8
- Top = 210
- Width = 705
- End
- End
- Begin VB.Label Label1
- Caption = "状态:"
- Height = 225
- Left = 120
- TabIndex = 3
- Top = 120
- Width = 645
- End
- Begin VB.Label Label3
- Height = 225
- Left = 750
- TabIndex = 2
- Top = 120
- Width = 1935
- End
- End
- Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
- Height = 3525
- Left = 45
- TabIndex = 0
- Top = 720
- Width = 6105
- _ExtentX = 10769
- _ExtentY = 6218
- _Version = 393216
- ScrollTrack = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Menu file
- Caption = "文件"
- Begin VB.Menu Save
- Caption = "保存"
- Shortcut = ^S
- End
- Begin VB.Menu MyExit
- Caption = "退出"
- Shortcut = ^E
- End
- End
- Begin VB.Menu Opting
- Caption = "操作"
- Begin VB.Menu TestChssCode
- Caption = "代码正确性测定"
- End
- Begin VB.Menu code
- Caption = "编码"
- End
- Begin VB.Menu codetest
- Caption = "编码并测试"
- End
- Begin VB.Menu onlytest
- Caption = "仅测试库"
- End
- Begin VB.Menu onlytestEx
- Caption = "仅测试库Ex"
- End
- Begin VB.Menu outcode
- Caption = "反编码"
- Shortcut = ^D
- End
- Begin VB.Menu outcodeMain
- Caption = "反编主码"
- End
- End
- Begin VB.Menu tool
- Caption = "工具"
- Begin VB.Menu TranAD
- Caption = "格式转换"
- End
- End
- Begin VB.Menu help
- Caption = "帮助"
- Begin VB.Menu about
- Caption = "关于"
- Shortcut = ^H
- End
- End
- End
- Attribute VB_Name = "form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim dic_lib As String
- Dim cur_lib As String
- Private Sub about_Click()
- MsgBox " 极速五笔是由王华设计开发," & Chr(13) _
- & "有任何问题请发电子邮件与本人联系。" & Chr(13) _
- & "E-MAIL:whln669@sohu.com. 谢谢!", , "极速五笔"
- End Sub
- Private Sub code_Click()
- Save_Click
- End Sub
- Private Sub codetest_Click()
- If (HaveSelect() = 0) Then
- MSFlexGrid1.GridColor = vbBlue
- DictSave
- If (test_file() = 1) Then
- If (creat(App.path & "source" & base_code.Text, App.path & "userSource.txt", App.path & "source_Ex" & Exdend_code.Text, App.path & "lib" & outcodefile.Text, 64, 27, 4)) Then
- MsgBox "生成词典失败"
- Else
- SaveRegLong HKEY_CURRENT_USER, "Software\jsime", "jsime", "1"
- End If
- Label3.Caption = "已生成新词典"
- End If
- End If
- End Sub
- Private Sub Save_Click()
- If (HaveSelect() = 0) Then
- MSFlexGrid1.GridColor = vbBlue
- DictSave
- If (test_file() = 1) Then
- If (creatNotest(App.path & "source" & base_code.Text, App.path & "userSource.txt", App.path & "source_Ex" & Exdend_code.Text, App.path & "lib" & outcodefile.Text, 64, 27, 4)) Then
- MsgBox "生成词典失败"
- Else
- SaveRegLong HKEY_CURRENT_USER, "Software\jsime", "jsime", "1"
- End If
- Label3.Caption = "已生成新词典"
- End If
- End If
- End Sub
- Function test_file() As Integer
- Dim ret
- ret = 1
- If (base_code.Text = "") Then
- MsgBox "基本源码库不存在 "
- ret = 0
- End If
- If (Exdend_code.Text = "" And ret = 1) Then
- MsgBox "扩展源码库不存在 "
- ret = 0
- End If
- If (outcodefile.Text = "" And ret = 1) Then
- MsgBox "必须指定输入库的名称 "
- ret = 0
- End If
- test_file = ret
- End Function
- Private Sub myReadfile()
- Dim MyString As String, MyString1 As String
- path = App.path & "userSource.txt"
- Me.Caption = path
- Open path For Input As #1 ' 打开输入文件
- Dim j As Long
- j = 1
- Do While Not EOF(1) ' 循环至文件尾。
- Line Input #1, MyString ' 将数据读入变量。
- If (Len(MyString) > 2) Then
-
- If (MSFlexGrid1.Rows - 1 < j) Then
- MSFlexGrid1.AddItem j - 1
- End If
-
- MyString1 = MyCutStr(MyString, " ")
- MSFlexGrid1.TextMatrix(j, 0) = j
- MSFlexGrid1.TextMatrix(j, 1) = MyString1
- MSFlexGrid1.TextMatrix(j, 2) = MyString
- j = j + 1
-
- End If
- ' 在立即窗口中显示数据。
- Loop
- Close #1 ' 关闭文件。
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- ' Save_Click
- End Sub
- Private Sub MSFlexGrid1_DblClick()
- Dim r
- r = MSFlexGrid1.Row
- Form2.SetCurR (r)
- Form2.Text1.Text = MSFlexGrid1.TextMatrix(r, 1)
- Form2.Text2.Text = MSFlexGrid1.TextMatrix(r, 2)
- Form2.Show 1, Me
- End Sub
- Private Sub MSFlexGrid1_KeyDown(KeyCode As Integer, Shift As Integer)
- Dim f, ss As String, tt As String
- If KeyCode = 16 Or KeyCode = 17 Or KeyCode = 18 Or KeyCode = 92 Or KeyCode = 27 Then '
-
- Else
- If (KeyCode = 46) Then
- MSFlexGrid1.Text = ""
- Label3 = "已修改,注意保存!"
- End If
- ActSelectProsce KeyCode
-
- End If
- End Sub
- Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
- Dim f
- Dim ss As String, tt As String
- MSFlexGrid1.GridColor = vbRed
- Label3 = "已修改,注意保存!"
- 'KeyPross = 0表示按键未处理过
- cc = HaveSelect()
- If (HaveSelect() = 0 And KeyPross = 0) Then
- If (MSFlexGrid1.Col = 1 And KeyAscii > 0) Then '分为两大部分
- If KeyAscii = 32 Then
- Label3.Caption = "不能在编码栏内输入空格"
- Label3.ForeColor = vbRed
- Else
-
- full = Chr(KeyAscii)
- tt = MSFlexGrid1.Text
-
- If KeyAscii = 8 Then '
- If (Len(tt) >= 1) Then
- tt = Mid(tt, 1, Len(tt) - 1)
- End If
- full = ""
- End If
- MSFlexGrid1.Text = tt & full
- End If
- End If
-
-
- If (MSFlexGrid1.Col = 2) Then
- full = CodeToChinese(KeyAscii)
- tt = MSFlexGrid1.Text
-
- If KeyAscii = 8 Then '
- If (Len(tt) >= 1) Then
- tt = Mid(tt, 1, Len(tt) - 1)
- End If
- full = ""
- End If
- MSFlexGrid1.Text = tt & full
-
- End If
- End If
- End Sub
- Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- Dim tt As Long, i As Long, r As Long
- Dim myMenu As cPopupMenu
- Dim modify As Integer
- modify = 0
- If (Button = 2) Then
- Set myMenu = New cPopupMenu
-
- r = MSFlexGrid1.RowSel - MSFlexGrid1.Row
-
- If (MSFlexGrid1.MouseRow = 0) Then
- myMenu.Popup "排序", "----"
- If (myMenu.SelID = 1) Then
-
- MSFlexGrid1.Sort = 1
- modify = 1
- End If
- If (myMenu.SelID = 2) Then
-
- End If
- End If
-
- If (MSFlexGrid1.MouseCol = 0) Then
- myMenu.Popup "插入" & r + 1 & "行", "删除" & r + 1 & "行"
- If (myMenu.SelID = 1) Then
- For i = 0 To r
- MSFlexGrid1.AddItem "插入新行", MSFlexGrid1.Row
- Next
- End If
- If (myMenu.SelID = 2) Then
- For i = 0 To r
- MSFlexGrid1.RemoveItem (MSFlexGrid1.Row)
- Next
- End If
-
- End If
-
- If (MSFlexGrid1.MouseRow <> 0 And MSFlexGrid1.MouseCol <> 0) Then
-
- myMenu.Popup "交换行", "-"
- If (myMenu.SelID = 1) Then
- ChanceSelct
- End If
- End If
-
- Else
-
- If (MSFlexGrid1.Col = 1) Then '输入法状态管理
- tt = GetKeyboardLayout(0)
- If (tt < 0) Then
- hCurKBDLayout = tt
- End If
- tt = LoadKeyboardLayout("00000804", KLF_REORDER)
- ActivateKeyboardLayout tt, 1
- Else
- tt = GetKeyboardLayout(0)
- If (tt < 0) Then
- hCurKBDLayout = tt
- End If
- ActivateKeyboardLayout hCurKBDLayout, 1
- End If
- End If
-
- If (modify = 1) Then
- MSFlexGrid1.GridColor = vbRed
- Label3 = "已修改,注意保存!"
- End If
- End Sub
- Private Sub Form_Load()
- Dim i As Long
- Dim ss1 As String, ss2 As String
- Dim tt As Integer, path As String
-
- '读注册表,有新词,就说明此次启动是为了增加词,
- '不必进行其他处理
- If (Command = "ShowMessageBox") Then
- CheckAdd (1)
- Else
- CheckAdd (0)
- End If
-
- '////////////////////////////////////////////
-
- path = App.path & "userSource.txt"
- Open path For Append As #1 ' 打开输入文件。
-
- If (Len(ss1) > 0 And Len(ss1) > 0) Then
- Print #1, ss1 & " " & ss2
- End If
- Close #1 ' 关闭文件。
-
-
-
- MSFlexGrid1.Cols = 4
- MSFlexGrid1.Width = form1.Width
- For i = 1 To 32
- MSFlexGrid1.AddItem "", i
- Next
-
- '设定固定行 第一行
- MSFlexGrid1.FixedRows = 1
-
- MSFlexGrid1.ColAlignment(1) = 1
- MSFlexGrid1.ColAlignment(2) = 2
-
- MSFlexGrid1.TextMatrix(0, 0) = "序号"
- MSFlexGrid1.TextMatrix(0, 1) = "编码"
- MSFlexGrid1.TextMatrix(0, 2) = "汉字"
- MSFlexGrid1.TextMatrix(0, 3) = "测定"
- myReadfile
- '************************************************************************************
- listfile App.path & "source", base_code
- If (base_code.ListCount > 0) Then
- base_code.ListIndex = 0
- End If
- listfile App.path & "source_Ex", Exdend_code
- If (Exdend_code.ListCount > 0) Then
- Exdend_code.ListIndex = 0
- End If
- End Sub
- Function listfile(pathname As String, objcombo As ComboBox)
- Dim fso, f, f1, fc, renf, i
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set f = fso.GetFolder(pathname)
- Set fc = f.Files
- i = fc.Count
- For Each f1 In fc '遍历文件
- objcombo.AddItem (f1.Name)
- Next
- End Function
- Private Sub Form_Resize()
- Dim i, firstW, endW, rev, engle
-
- StateHight = 1200
- firstW = 700
- endW = 700
- engle = 200
- rev = 700
-
-
- MSFlexGrid1.Width = form1.Width - engle
- MSFlexGrid1.Height = form1.Height - StateHight - MSFlexGrid1.Top
-
-
- '第一行的宽
- MSFlexGrid1.ColWidth(0) = firstW
-
- '同间各行的宽
- i = 1
- While i < MSFlexGrid1.Cols - 1
- '减第一列宽、最后一列宽、留边,保留空白区
- If (form1.Width - firstW - endW - engle - rev > 0) Then
- MSFlexGrid1.ColWidth(i) = (form1.Width - firstW - endW - engle - rev) / 2
- End If
- i = i + 1
- Wend
-
- '最后一行的宽
- MSFlexGrid1.ColWidth(MSFlexGrid1.Cols - 1) = endW
-
- Picture1.Top = form1.Height - StateHight
- Picture1.Width = form1.Width
- End Sub
- Private Sub MyExit_Click()
- End
- End Sub
- Private Sub onlytest_Click()
- Dim cc As String, RetStr As String * MAX_PATH
- cc = InputBox("请输入测试编码:", "编码库测试", "aa")
- If cc = "" Then
- MsgBox "你没有输入英文测试码?"
- Else
- dic_lib = ReadRegString(HKEY_CURRENT_USER, "Software\jsime", "cur_dic_lib")
- dd = myfindfile(App.path & "lib" & dic_lib)
- If (Len(dd) = 0) Then
- MsgBox "文件没找到" & App.path & "lib" & dic_lib
- Else
- dd = TestLib(App.path & "lib" & dic_lib, 64, 27, 4, cc, 0, RetStr)
- If (dd = 0) Then
- MsgBox "VB查询失败"
- Else
- MsgBox "查询成功:" & cc & "=" & RetStr
- End If
- End If
-
- End If
-
-
- End Sub
- Private Sub onlytestEx_Click()
- dic_lib = ReadRegString(HKEY_CURRENT_USER, "Software\jsime", "cur_dic_lib")
- dd = myfindfile(App.path & "lib" & dic_lib)
- If (Len(dd) = 0) Then
- MsgBox "文件没找到" & App.path & "lib" & dic_lib
- Else
- TestLibEx App.path & "lib" & dic_lib, 64, 27, 4
- End If
- End Sub
- Private Sub outcode_Click()
-
- dic_lib = ReadRegString(HKEY_CURRENT_USER, "Software\jsime", "cur_dic_lib")
- dd = myfindfile(App.path & "lib" & dic_lib)
- If (Len(dd) = 0) Then
- MsgBox "文件没找到" & App.path & "lib" & dic_lib
- Else
- outsource App.path & "lib" & dic_lib, App.path & "reCode.txt", 64, 27, 4
- MsgBox "reCode.txt全部反编码完成"
- End If
- End Sub
- Private Sub outcodeMain_Click()
- dic_lib = ReadRegString(HKEY_CURRENT_USER, "Software\jsime", "cur_dic_lib")
- dd = myfindfile(App.path & "lib" & dic_lib)
- If (Len(dd) = 0) Then
- MsgBox "文件没找到" & App.path & "lib" & dic_lib
- Else
- OutsourceOne App.path & "lib" & dic_lib, App.path & "MainCode.txt", 64, 27, 4
- MsgBox "MainCode.txt主码反编完成"
- End If
- End Sub
- Private Sub TestChssCode_Click()
- Dim ss As String, temss As String, temss2 As String
- Dim r
-
- r = form1.MSFlexGrid1.Rows - 1
- For i = 1 To r
- ss = " "
- temss = form1.MSFlexGrid1.TextMatrix(i, 2)
- temss2 = form1.MSFlexGrid1.TextMatrix(i, 1)
-
- ChissToCode App.path & "MainCode.txt", temss, ss
- 'MsgBox ss
- Text6.Text = LCase(Trim(ss))
- ss = Trim(Text6.Text)
-
- temss2 = LCase(Trim(temss2))
- If (ss = temss2) Then
- MSFlexGrid1.TextMatrix(i, 3) = ""
- Else
- If (ss = "") Then
- MSFlexGrid1.TextMatrix(i, 3) = "????"
- Else
- MSFlexGrid1.TextMatrix(i, 3) = "****"
- End If
- End If
-
- Next
- End Sub
- Private Sub Text1_Change()
- Find "", Text1.Text, ""
- End Sub
- Private Sub Text2_Change()
-
- Find Text2.Text, "", ""
- End Sub
- '///////////////////////////////////////////////////////////
- '函数部分
- '///////////////////////////////////////////////////////////
- '交换执行部分的行
- Private Sub ChanceSelct()
- Dim i As Long, r As Long, c As Long
- Dim dr As Long, dc As Long
- Dim tr As Long, tc As Long, t As Long
- cc = HaveSelect()
- If (cc = 1 Or cc = 3) Then
- dr = MSFlexGrid1.Row
- dc = MSFlexGrid1.Col
-
- r = MSFlexGrid1.RowSel - dr + 1
- c = MSFlexGrid1.ColSel - dc + 1
- tr = MSFlexGrid1.RowSel
- tc = MSFlexGrid1.ColSel
- t = r - 1
-
- For i = 0 To t - 1
- MSFlexGrid1.RowPosition(tr) = dr + i
- Next
- End If
- End Sub
- Private Sub DictSave()
- Dim ss1 As String, ss2 As String
- Dim tt As Integer, path As String
- path = App.path & "userSource.txt"
- Me.Caption = path
- Open path For Output As #1 ' 打开输入文件。
- tt = MSFlexGrid1.Rows
- For i = 1 To tt - 1
- ss1 = MSFlexGrid1.TextMatrix(i, 1)
- ss2 = MSFlexGrid1.TextMatrix(i, 2)
- If (Len(ss1) > 0 And Len(ss1) > 0) Then
- Print #1, ss1 & " " & ss2
- End If
- Next
- Close #1 ' 关闭文件。
- Label3.Caption = "已保存"
- End Sub
- Private Function HaveSelect() As Integer
- Dim r, c, sc, sr, dr, dc, ret
- dr = MSFlexGrid1.Row
- dc = MSFlexGrid1.Col
-
- r = MSFlexGrid1.RowSel - dr
- c = MSFlexGrid1.ColSel - dc
-
- ret = 0
- If (c = 0 And r = 0) Then '判断是否选择多于一个单元格
-
- Else
- If (r <> 0) Then
- ret = 1
- End If
- If (c <> 0) Then
- ret = 2
- End If
- If (c <> 0 And r <> 0) Then
- ret = 3
- End If
- End If
-
- HaveSelect = ret
- End Function
-
-
- '反回为1代表按键已处于过,0表示没有处理
- Private Function ActSelectProsce(KeyAscii As Integer)
- Dim i, j, r, c, sc, sr, full, dr, dc
- Dim sel, ret
- ret = 0
-
- If KeyAscii = 16 Or KeyAscii = 17 Or KeyAscii = 18 Or KeyAscii = 92 Then '
- ActSelectProsce = ret
- Exit Function
- End If
-
- dr = MSFlexGrid1.Row
- dc = MSFlexGrid1.Col
-
- r = MSFlexGrid1.RowSel - dr
- c = MSFlexGrid1.ColSel - dc
- If c < 0 Then sc = -1 Else sc = 1
- If r < 0 Then sr = -1 Else sr = 1
-
- If Not (c = 0 And r = 0) Then '判断是否选择多于一个单元格
-
- Label3 = "已修改,注意保存!"
- full = Chr(KeyAscii)
-
- For i = 0 To r Step sr
- For j = 0 To c Step sc
- tt = MSFlexGrid1.TextMatrix(dr + i, dc + j)
-
- If KeyAscii = 8 Then '
- If (Len(tt) >= 1) Then
- tt = Mid(tt, 1, Len(tt) - 1)
- End If
- full = ""
- End If
-
- If KeyAscii = 46 Then '
- tt = ""
- full = ""
- End If
-
- MSFlexGrid1.TextMatrix(dr + i, dc + j) = tt + full
- Next j
- Next i
- ret = 1
- End If
- ActSelectProsce = ret
- End Function
- Sub Find(ss1 As String, ss2 As String, ss3 As String)
- Dim ret As Long
- Dim i As Long, r As Long, c As Long
- Dim tt As String, ss As String
- If (Len(ss1) <= 4) Then
- If (ss1 <> "") Then
- ss = ss1
- c = 1
- End If
-
- If (ss2 <> "") Then
- ss = ss2
- c = 2
- End If
-
- If (ss3 <> "") Then
- tt = Val(ss3)
- If (MSFlexGrid1.Rows < tt) Then
- MSFlexGrid1.TopRow = MSFlexGrid1.Rows - 1
- Else
- If (tt <= 0) Then
- MSFlexGrid1.TopRow = 1
- Else
- MSFlexGrid1.TopRow = tt
- End If
- End If
-
- Else
- r = MSFlexGrid1.Rows - 1
- For i = 1 To r
- tt = Mid(MSFlexGrid1.TextMatrix(i, c), 1, Len(ss))
-
- If (tt = ss) Then
- ret = i
- MSFlexGrid1.TopRow = i
- Exit For
- End If
- Next
- End If
- End If
- End Sub
- '/////////////////////////////////////////////////////////
- Private Sub Text3_Change()
- Find "", "", Text3.Text
- End Sub
- Private Sub Text4_Change()
- Dim ss As String, temss As String
- ss = " "
- temss = Text4.Text
- ChissToCode App.path & "MainCode.txt", temss, ss
- Text5.Text = ss
- End Sub
- Private Sub TranAD_Click()
- Dim t
- t = MsgBox(" 把文件tt.txt中以空格隔开的重编码" & Chr(13) _
- & "换成以分号隔开的重编码." & Chr(13) _
- & " 如:FULK 增加 啬 => FULK 增加;啬" & Chr(13) _
- & " 注:输出文件为:tt.txtt", _
- vbOKCancel, "编码转换以符合本输入法源码要求")
- If t = 1 Then
- ToolTranChar App.path & "tt.txt", 0, " ", ";"
- End If
- End Sub