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

📄 form1.frm

📁 按照拼音查汉字的控件
💻 FRM
字号:
VERSION 5.00
Object = "{3A5A8CAE-0FA4-4C32-B7FE-3D4DEE8C29CC}#1.0#0"; "ygyHZPY.ocx"
Begin VB.Form Form1 
   Caption         =   "袁飞汉字拼音控件 DEMO"
   ClientHeight    =   3090
   ClientLeft      =   1830
   ClientTop       =   1905
   ClientWidth     =   6375
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   6375
   Begin VB.CommandButton Command5 
      Caption         =   "GB汉字判断"
      Height          =   510
      Left            =   4275
      TabIndex        =   8
      Top             =   1890
      Width           =   1950
   End
   Begin VB.ListBox List2 
      Height          =   1860
      Left            =   2430
      TabIndex        =   7
      Top             =   1080
      Width           =   1680
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   2430
      TabIndex        =   6
      Top             =   765
      Width           =   1680
   End
   Begin VB.CommandButton Command4 
      Caption         =   "取得拼音之GB汉字"
      Height          =   510
      Left            =   4275
      TabIndex        =   5
      Top             =   1350
      Width           =   1950
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   630
      TabIndex        =   4
      Top             =   765
      Width           =   1680
   End
   Begin VB.ListBox List1 
      Height          =   1860
      Left            =   630
      TabIndex        =   3
      Top             =   1080
      Width           =   1680
   End
   Begin VB.CommandButton Command3 
      Caption         =   "关于..."
      Height          =   510
      Left            =   4275
      TabIndex        =   2
      Top             =   2430
      Width           =   1950
   End
   Begin ygyHZPY.HZPY HZPY1 
      Height          =   495
      Left            =   90
      Top             =   135
      Width           =   495
      _ExtentX        =   873
      _ExtentY        =   873
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取得拼音之汉字"
      Height          =   510
      Left            =   4275
      TabIndex        =   1
      Top             =   720
      Width           =   1950
   End
   Begin VB.CommandButton Command1 
      Caption         =   "取得汉字之拼音"
      Height          =   510
      Left            =   4275
      TabIndex        =   0
      Top             =   45
      Width           =   1950
   End
   Begin VB.Label Label2 
      Caption         =   "请输入一个拼音"
      Height          =   285
      Left            =   2475
      TabIndex        =   10
      Top             =   360
      Width           =   1500
   End
   Begin VB.Label Label1 
      Caption         =   "请输入一个汉字"
      Height          =   285
      Left            =   630
      TabIndex        =   9
      Top             =   360
      Width           =   1500
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim strPY()
Dim i As Integer

HZPY1.InitHZPYData
If Text1.Text = "" Then
    Text1.Text = "盛"
End If

List1.Clear
If HZPY1.GetPYFromHZ(Text1.Text, strPY) Then
    For i = 0 To UBound(strPY)
        List1.AddItem strPY(i)
    Next
End If
End Sub

Private Sub Command2_Click()
Dim strHZ()
Dim i As Integer

If Text2.Text = "" Then
    Text2.Text = "yuan"
End If

List2.Clear

If HZPY1.GetHZFromPY(Text2.Text, strHZ) Then
    For i = 0 To UBound(strHZ)
        List2.AddItem strHZ(i)
    Next
End If

End Sub

Private Sub Command3_Click()
HZPY1.About
End Sub

Private Sub Command4_Click()
Dim strHZ()
Dim i As Integer

If Text2.Text = "" Then
    Text2.Text = "yuan"
End If

List2.Clear

If HZPY1.GetGBHZFromPY(Text2.Text, strHZ) Then
    For i = 0 To UBound(strHZ)
        List2.AddItem strHZ(i)
    Next
End If
End Sub

Private Sub Command5_Click()
If HZPY1.isGB(InputBox("请输入一个汉字,看看是不是国标汉字:", "袁飞软件", "飛")) Then
    MsgBox "是国标汉字!", , "袁飞软件"
Else
    MsgBox "不是国标汉字!", , "袁飞软件"
End If
End Sub

Private Sub Form_Load()
HZPY1.InitPYHZData
HZPY1.InitPYHZData
End Sub

⌨️ 快捷键说明

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