📄 ascii.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "ASCII "
ClientHeight = 3930
ClientLeft = 45
ClientTop = 330
ClientWidth = 6075
Icon = "ASCII.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3930
ScaleWidth = 6075
StartUpPosition = 3 '窗口缺省
Begin VB.OptionButton Option2
Caption = "A51格式"
Height = 300
Left = 2400
TabIndex = 7
Top = 1200
Width = 1095
End
Begin VB.OptionButton Option1
Caption = "C51格式"
Height = 255
Left = 720
TabIndex = 6
Top = 1200
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "复制(&C)"
Height = 375
Left = 4560
TabIndex = 5
Top = 1440
Width = 1215
End
Begin VB.CommandButton Command3
Caption = " 清除(&L)"
Height = 375
Left = 4560
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 3
Top = 720
Width = 3615
End
Begin VB.TextBox Text2
Height = 1935
Left = 480
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Text = "ASCII.frx":0442
Top = 1560
Width = 3615
End
Begin VB.CommandButton Command2
Caption = "退出(&X)"
Height = 375
Left = 4560
TabIndex = 1
Top = 2880
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "转换(&H)"
Height = 375
Left = 4560
TabIndex = 0
Top = 720
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text2.Text = ""
If Len(Trim(Text1.Text)) > 0 Then
text_temp = Trim(Text1.Text)
stemp = text_temp
While (Len(text_temp) >= 1)
hz = Trim(Left(text_temp, 1))
text_temp = Trim(Right(text_temp, Len(text_temp) - 1))
hzasc = Asc(hz)
If Option1.Value = True Then
Text2.Text = Text2.Text + "0x" + Hex(hzasc) + ", "
Else
Text2.Text = Text2.Text + "0" + Hex(hzasc) + "H, "
End If
Wend
If Option1.Value Then
Text2.Text = Text2.Text + "//" + stemp + Chr(13) + Chr(10)
Else
Text2.Text = Text2.Text + ";" + stemp + Chr(13) + Chr(10)
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Text2.Text = ""
End Sub
Private Sub Command4_Click()
Clipboard.Clear
Clipboard.SetText Text2.Text
End Sub
Private Sub Form_Load()
Option1.Value = True
Option2.Value = False
End Sub
Private Sub Option1_Click()
Option1.Value = True
Option2.Value = False
Call Command1_Click
End Sub
Private Sub Option2_Click()
Option1.Value = False
Option2.Value = True
Call Command1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -