汉字转数字为了ce.frm

来自「通过此代码实现包括汉字的文字转换成数字」· FRM 代码 · 共 46 行

FRM
46
字号
VERSION 5.00
Begin VB.Form 汉字转数字为了CE 
   Caption         =   "Form1"
   ClientHeight    =   1665
   ClientLeft      =   60
   ClientTop       =   375
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   1665
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   615
      Left            =   120
      TabIndex        =   1
      Text            =   "Text2"
      Top             =   960
      Width           =   4455
   End
   Begin VB.TextBox Text1 
      Height          =   615
      Left            =   120
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   120
      Width           =   4455
   End
End
Attribute VB_Name = "汉字转数字为了CE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Text1_Change()
  Dim A() As Byte
  Dim i As Long, n As Long
  
  A = Text1.Text
  Text2.Text = ""
  n = UBound(A)
  For i = 0 To n
    If A(i) < 16 Then Text2.Text = Text2.Text & "0"
    Text2.Text = Text2.Text & Hex(A(i)) & Chr(32)
  Next
End Sub

⌨️ 快捷键说明

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