VERSION 5.00
Begin VB.Form Frmdsh 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "汉语拼音读数"
   ClientHeight    =   2100
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7725
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2100
   ScaleWidth      =   7725
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "汉语拼音读数"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   360
      TabIndex        =   3
      Top             =   1080
      Width           =   3255
   End
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5040
      TabIndex        =   0
      Text            =   "99"
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackColor       =   &H8000000D&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   615
      Left            =   4080
      TabIndex        =   2
      Top             =   1080
      Width           =   3255
   End
   Begin VB.Label Label1 
      Caption         =   "输入一个100以内的数："
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   360
      TabIndex        =   1
      Top             =   240
      Width           =   5055
   End
End
Attribute VB_Name = "Frmdsh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a(10) As String
Rem 存储数字的汉语拼音
Private Sub Form_Load()
   a(0) = "Ling": a(1) = "Yi": a(2) = "Er"
   a(3) = "San": a(4) = "Si": a(5) = "Wu"
   a(6) = "Liu": a(7) = "Qi": a(8) = "Ba"
   a(9) = "Jiu": a(10) = "Shi"
End Sub
Rem 用拼音读数
Private Sub Command1_Click()
   Dim x As Integer
   Dim m As Integer, n As Integer
   x = Text1.Text       '输入一个百以内的数
   If x >= 0 And x <= 99 Then
      n = x \ 10        '分离出的十位数字
      m = x Mod 10    '分离出的个位数字
      If n = 0 Then     '输出一位数
         Label2.Caption = a(m)
      Else
         If m = 0 Then  '输出个位数为0的两位数
            Label2.Caption = a(n) + " " + a(10)
         Else           '输出个位不为0的两位数
            Label2.Caption = a(n) + " " + a(10) + " " + a(m)
         End If
      End If
   Else                 '清除输出框
      MsgBox ("输入的数据超出规定范围，请重新输入。")
      Label2.Caption = ""
   End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Unload Me
   Frmsys.Show
End Sub

Private Sub CmdCancel_Click()
  Unload Me
  Frmsys.Show
End Sub

