📄 char.frm
字号:
VERSION 5.00
Begin VB.Form Form6
BorderStyle = 1 'Fixed Single
Caption = "汉字转换器"
ClientHeight = 645
ClientLeft = 45
ClientTop = 330
ClientWidth = 3420
LinkTopic = "Form6"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 645
ScaleWidth = 3420
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 270
Left = 1080
TabIndex = 0
Top = 0
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "转换"
Enabled = 0 'False
Height = 255
Left = 2520
TabIndex = 2
Top = 0
Width = 855
End
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 255
Left = 2520
TabIndex = 3
Top = 360
Width = 855
End
Begin VB.TextBox Text2
Height = 270
Left = 1080
Locked = -1 'True
TabIndex = 1
Top = 345
Width = 1335
End
Begin VB.Label Label1
Caption = "十六进制数:"
Height = 255
Left = 0
TabIndex = 5
Top = 360
Width = 1215
End
Begin VB.Label Label2
Caption = "汉字:"
Height = 255
Left = 0
TabIndex = 4
Top = 0
Width = 975
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim b() As Byte
Dim temp As String
Dim i As Long, Length As Long
temp = Text1
Open "C:\windows\temp\pctools1.dat" For Output As #1
Write #1, temp
Close #1
Open "C:\windows\temp\pctools1.dat" For Binary As #1
Length = LOF(1)
ReDim b(Length - 1)
Get #1, , b()
Close #1
Kill "C:\windows\temp\pctools1.dat"
temp = ""
For i = 1 To Length - 4
temp = temp & st(b(i))
Next i
Text2 = temp
End Sub
Private Sub Command2_Click()
Me.Hide
End Sub
Private Sub Text1_Change()
If Text1 <> "" Then Command1.Enabled = True Else Command1.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -