发布网友 发布时间:2022-05-01 08:03
共1个回答
热心网友 时间:2022-06-26 11:47
12345678910111213141516171819202122Option Explicit Dim sBin As String Dim sHex As StringPrivate Sub Command1_Click() sHex = Text1 HexToBin (sHex) Text2 = sBin sBin = ""End Sub Private Sub Form_Load() Text1 = ""End Sub Public Function HexToBin(ByVal sHex As String) As String '处理16进制转换2进制代码 Const s1 = "0000101001101111000", s2 = "0125A4936DB7FEC8" Dim i As Integer sHex = UCase(sHex) For i = 1 To Len(sHex) sBin = sBin & Mid(s1, InStr(1, s2, Mid(sHex, i, 1)), 4) Next iEnd Function