?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 1605
ClientLeft = 45
ClientTop = 435
ClientWidth = 3645
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1605
ScaleWidth = 3645
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txt2
Height = 1335
Left = 0
MultiLine = -1 'True
TabIndex = 1
Top = 240
Width = 3615
End
Begin VB.TextBox txt1
Height = 285
Left = 0
TabIndex = 0
Top = 0
Width = 3615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub txt1_Change()
Dim i As Long
txt2 = ""
For i = 1 To Len(txt1)
txt2 = txt2 & IIf(Mid(txt1, i, 1) <> "=" And Mid(txt1, i, 1) <> "?", "%" & DEC_to_HEX(Asc(Mid(txt1, i, 1))), Mid(txt1, i, 1))
Next
End Sub
' 用途:將十進制轉化為十六進制
' 輸入:Dec(十進制數)
' 輸入數據類型:Long
' 輸出:DEC_to_HEX(十六進制數)
' 輸出數據類型:String
' 輸入的最大數為2147483647,輸出最大數為7FFFFFFF
Public Function DEC_to_HEX(Dec As Long) As String
Dim a As String
DEC_to_HEX = ""
Do While Dec > 0
a = CStr(Dec Mod 16)
Select Case a
Case "10": a = "A"
Case "11": a = "B"
Case "12": a = "C"
Case "13": a = "D"
Case "14": a = "E"
Case "15": a = "F"
End Select
DEC_to_HEX = a & DEC_to_HEX
Dec = Dec \ 16
Loop
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -