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

📄 form1.frm

📁 16与10进制转换
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   615
      Left            =   2520
      TabIndex        =   2
      Top             =   1560
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   1680
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   1095
      Left            =   960
      MultiLine       =   -1  'True
      TabIndex        =   0
      Text            =   "Form1.frx":0000
      Top             =   480
      Width           =   2775
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim aa$, bb$, i&
Private Sub Form_Load()
 Command1.Caption = "汉转16"
 Command2.Caption = "16转汉"
 Command1.Enabled = True
 Command2.Enabled = False

End Sub

Private Sub Command1_Click()
 aa = Text1.Text
 Text1.Text = ""
 For i = 1 To Len(aa)
 Text1.Text = Text1.Text & Hex(Asc(Mid(aa, i, 1))) & " "
 Next i
 Command1.Enabled = Not Command1.Enabled
 Command2.Enabled = Not Command2.Enabled
End Sub

Private Sub Command2_Click()
 Dim s
 aa = Trim(Text1.Text)
 Text1.Text = ""
 s = Split(aa, " ")
 For i = 0 To UBound(s)
 Text1.Text = Text1.Text & Chr("&H" + s(i))
 Next i
 Command1.Enabled = Not Command1.Enabled
 Command2.Enabled = Not Command2.Enabled
End Sub

⌨️ 快捷键说明

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