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

📄 pytest.frm

📁 用VFP编写COM服务程序实现按汉字拼音与笔划进行排序及查询
💻 FRM
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form Form1 
   Caption         =   "VFP之COM实例"
   ClientHeight    =   6408
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   9108
   LinkTopic       =   "Form1"
   ScaleHeight     =   534
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   759
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text5 
      Height          =   372
      Left            =   1440
      TabIndex        =   17
      Top             =   5760
      Width           =   7452
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关于"
      Height          =   372
      Left            =   7800
      TabIndex        =   16
      Top             =   240
      Width           =   972
   End
   Begin VB.TextBox Text4 
      Height          =   372
      Left            =   1440
      TabIndex        =   14
      Top             =   5280
      Width           =   7452
   End
   Begin VB.TextBox Text3 
      Height          =   372
      Left            =   720
      TabIndex        =   10
      Top             =   4800
      Width           =   8172
   End
   Begin VB.TextBox Text2 
      Height          =   372
      Left            =   720
      TabIndex        =   9
      Top             =   4320
      Width           =   8172
   End
   Begin VB.TextBox Text1 
      Height          =   372
      Left            =   720
      TabIndex        =   8
      Top             =   3840
      Width           =   8172
   End
   Begin RichTextLib.RichTextBox RichTextBox3 
      Height          =   2400
      Left            =   6120
      TabIndex        =   3
      Top             =   960
      Width           =   2844
      _ExtentX        =   5017
      _ExtentY        =   4233
      _Version        =   393217
      ScrollBars      =   3
      TextRTF         =   $"PYTEST.frx":0000
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   7.8
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin RichTextLib.RichTextBox RichTextBox1 
      Height          =   2400
      Left            =   120
      TabIndex        =   1
      Top             =   960
      Width           =   2724
      _ExtentX        =   4805
      _ExtentY        =   4233
      _Version        =   393217
      ScrollBars      =   3
      TextRTF         =   $"PYTEST.frx":0296
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   7.8
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.CommandButton Command1 
      Caption         =   "开始排序"
      Height          =   372
      Left            =   6720
      TabIndex        =   0
      Top             =   240
      Width           =   972
   End
   Begin RichTextLib.RichTextBox RichTextBox2 
      Height          =   2400
      Left            =   3000
      TabIndex        =   2
      Top             =   960
      Width           =   2964
      _ExtentX        =   5228
      _ExtentY        =   4233
      _Version        =   393217
      ScrollBars      =   3
      TextRTF         =   $"PYTEST.frx":052C
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   7.8
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "按笔划单行排序"
      Height          =   180
      Left            =   120
      TabIndex        =   18
      Top             =   5880
      Width           =   1260
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "按拼音单行排序"
      Height          =   180
      Left            =   120
      TabIndex        =   15
      Top             =   5400
      Width           =   1260
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "笔划"
      Height          =   180
      Left            =   240
      TabIndex        =   13
      Top             =   4920
      Width           =   360
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "拼音"
      Height          =   180
      Left            =   240
      TabIndex        =   12
      Top             =   4440
      Width           =   360
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "原文"
      Height          =   180
      Left            =   240
      TabIndex        =   11
      Top             =   3960
      Width           =   360
   End
   Begin VB.Label Label4 
      Caption         =   "按笔划排序"
      Height          =   252
      Left            =   6840
      TabIndex        =   7
      Top             =   3480
      Width           =   972
   End
   Begin VB.Label Label3 
      Caption         =   "按拼音排序"
      Height          =   252
      Left            =   3960
      TabIndex        =   6
      Top             =   3480
      Width           =   972
   End
   Begin VB.Label Label2 
      Caption         =   "原始数据"
      Height          =   252
      Left            =   1080
      TabIndex        =   5
      Top             =   3480
      Width           =   972
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "利用VFP所编的COM程序实现汉字排序与查询的例子"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   13.8
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   276
      Left            =   480
      TabIndex        =   4
      Top             =   240
      Width           =   6108
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim s As String
Dim ohz As New hz.Hanzi

Private Sub Command1_Click()
t! = Timer

RichTextBox2.Text = ohz.Sort(s, 1)  '1:按拼音排
RichTextBox3.Text = ohz.Sort(s, 2)  '2:按笔划排
Text2 = ohz.Pinyin(Text1, False)    'False或缺省:全拼,True:首拼
Text3 = ohz.Stroke(Text1)           '笔划数
Text4 = ohz.Sort(Text1, 16 + 1)     '按拼音单行排序
Text5 = ohz.Sort(Text1, 16 + 2)     '按笔划单行排序
ohz.LongSort "youbian.txt", "00.txt", 2, 30
MsgBox "排序完成,使用时间为:" & (Timer - t!) & "秒," + vbCrLf + _
"按笔划排序的文件00.TXT已生成 "
End Sub

Private Sub Command2_Click()
MsgBox ohz.About
End Sub

Private Sub Form_Load()
Dim hz As String, s0 As String
RichTextBox1.LoadFile "youbian.txt", 1
s = RichTextBox1.Text
hz = ""
For i = 1 To 500
    s0 = Mid(s, i, 1)
    If Asc(s0) < 0 Then hz = hz + s0
Next
Text1 = hz

End Sub

⌨️ 快捷键说明

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