亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? hexedit.bas

?? 一本關于VB串口編程的詳細參考資料
?? BAS
字號:
Attribute VB_Name = "Hexedit"



'**********************************
'接收模塊
'**********************************

Public bytReceiveByte() As Byte     '接收到的字節
Public intReceiveLen As Integer     '接收到的字節數

'**********************************




'**********************************
'顯示模塊
'**********************************

Public strAddress As String     '地址信息
Public strHex As String         '十六進制編碼
Public strAscii As String        'ASCII碼

'**********************************



Public intHexWidth As Integer       '顯示列數


'**********************************

Public intOriginX As Long       '橫向原點(像素)
Public intOriginY As Integer    '縱向原點(行)
Public intLine As Integer       '總行數

'**********************************




'**********************************
'顯示常量
'**********************************

Public Const ChrWidth = 105             '單位寬度
Public Const ChrHeight = 2 * ChrWidth   '單位高度
Public Const BorderWidth = 210          '預留邊界
Public Const LineMax = 16               '最大顯示行數



'**********************************
'輸入處理
'處理接收到的字節流,并保存在全局變量
'bytReceiveRyte()
'**********************************



Public Sub InputManage(bytInput() As Byte, intInputLenth As Integer)

    

   
    Dim n As Integer                                '定義變量及初始化
    
    ReDim Preserve bytReceiveByte(intReceiveLen + intInputLenth)

    For n = 1 To intInputLenth Step 1
        bytReceiveByte(intReceiveLen + n - 1) = bytInput(n - 1)
    Next n
    
    intReceiveLen = intReceiveLen + intInputLenth
    
End Sub

'***********************************
'為輸出準備文本
'保存在全局變量
'strText
'strHex
'strAddress
'總行數保存在
'intLine
'***********************************

Public Sub GetDisplayText()

    Dim n As Integer
    Dim intValue As Integer
    Dim intHighHex As Integer
    Dim intLowHex As Integer
    Dim strSingleChr As String * 1
    
    Dim intAddress As Integer
    Dim intAddressArray(8) As Integer
    Dim intHighAddress As Integer
    
    
    
    strAscii = ""            '設置初值
    strHex = ""
    strAddress = ""
    
    '*****************************************
    '獲得16進制碼和ASCII碼的字符串
    '*****************************************
    
    
    
    For n = 1 To intReceiveLen
        intValue = bytReceiveByte(n - 1)
        
        If intValue < 32 Or intValue > 128 Then         '處理非法字符
            strSingleChr = Chr(46)                      '對于不能顯示的ASCII碼,
        Else                                            '用"."表示
            strSingleChr = Chr(intValue)
        End If
        
        strAscii = strAscii + strSingleChr
        
        intHighHex = intValue \ 16
        intLowHex = intValue - intHighHex * 16
        
        If intHighHex < 10 Then
            intHighHex = intHighHex + 48
        Else
            intHighHex = intHighHex + 55
        End If
        If intLowHex < 10 Then
            intLowHex = intLowHex + 48
        Else
            intLowHex = intLowHex + 55
        End If
        
        strHex = strHex + " " + Chr$(intHighHex) + Chr$(intLowHex) + " "
        
        If (n Mod intHexWidth) = 0 Then                 '設置換行
            strAscii = strAscii + Chr$(13) + Chr$(10)
            strHex = strHex + Chr$(13) + Chr$(10)
        Else
            
        End If
    Next n
    
    '******************************************
    
    
    '***************************************
    '獲得地址字符串
    '***************************************
    
    intLine = intReceiveLen \ intHexWidth
    
    If (intReceiveLen - intHexWidth * intLine) > 0 Then
    intLine = intLine + 1
    End If
    
    For n = 1 To intLine
        intAddress = (n - 1) * intHexWidth
        
        If intAdd48Chk = 1 Then
            intHighAddress = 8
        Else
            intHighAddress = 4
        End If
            intAddressArray(0) = intAddress
        For m = 1 To intHighAddress
            intAddressArray(m) = intAddressArray(m - 1) \ 16
        Next m
        For m = 1 To intHighAddress
            intAddressArray(m - 1) = intAddressArray(m - 1) - intAddressArray(m) * 16
        Next m
        For m = 1 To intHighAddress
        
            If intAddressArray(intHighAddress - m) < 10 Then
                intAddressArray(intHighAddress - m) = intAddressArray(intHighAddress - m) + Asc("0")
                
            Else
                intAddressArray(intHighAddress - m) = intAddressArray(intHighAddress - m) + Asc("A") - 10
                
            End If
            strAddress = strAddress + Chr$(intAddressArray(intHighAddress - m))
        Next m
        
        strAddress = strAddress + Chr$(13) + Chr$(10)       '設置換行
            
    Next n
    
    
    '***************************************
End Sub

'*************************************
'顯示輸出
'*************************************

Public Sub display()

    
    Dim intViewWidth As Long        '橫向寬度(像素)
    Dim intViewLine As Integer      '縱向寬度(行)

    Dim strDisplayAddress As String
    Dim strDisplayHex As String
    Dim strDisplayAscii As String
    
    strDisplayAddress = ""
    strDisplayHex = ""
    strDisplayAscii = ""
    
    Dim intStart As Integer
    Dim intLenth As Integer
    
    
    '***************************************
    '調整顯示頁面大小,設置滾動位置寬度
    '***************************************
   
    
    If intAdd48Chk = 1 Then
        frmMain.txtHexEditAddress.Width = 8 * ChrWidth + BorderWidth
    Else
        frmMain.txtHexEditAddress.Width = 4 * ChrWidth + BorderWidth
    End If
        
    frmMain.txtHexEditHex.Width = intHexWidth * 4 * ChrWidth + BorderWidth
    frmMain.txtHexEditText.Width = intHexWidth * ChrWidth + BorderWidth
    frmMain.txtBlank.Width = BorderWidth
    
    intViewWidth = frmMain.txtHexEditAddress.Width * intAddressChk + frmMain.txtHexEditHex.Width * intHexChk + frmMain.txtHexEditText.Width * intAsciiChk
    
    If intViewWidth <= frmMain.fraHexEditBackground.Width And intLine < LineMax Then
        frmMain.txtBlank.Width = frmMain.fraHexEditBackground.Width - intViewWidth
        frmMain.hsclHexEdit.Visible = False
        frmMain.vsclHexEdit.Visible = False
        intViewWidth = frmMain.fraHexEditBackground.Width
        intViewLine = intLine
        intOriginX = 0
        intOriginY = 0
        
    ElseIf intViewWidth > frmMain.fraHexEditBackground.Width And intLine < LineMax - 1 Then
        frmMain.hsclHexEdit.Visible = True
        frmMain.vsclHexEdit.Visible = False
        frmMain.hsclHexEdit.Width = frmMain.fraHexEditBackground.Width
        intViewLine = intLine
        intOriginY = 0
        If intOriginX > intViewWidth - frmMain.fraHexEditBackground.Width Then
            intOriginX = intViewWidth - frmMain.fraHexEditBackground.Width
        End If
        
    ElseIf intViewWidth < (frmMain.fraHexEditBackground.Width - frmMain.vsclHexEdit.Width) And intLine >= LineMax Then
        frmMain.vsclHexEdit.Visible = True
        frmMain.hsclHexEdit.Visible = False
        frmMain.txtBlank.Width = frmMain.fraHexEditBackground.Width - intViewWidth
        intViewWidth = frmMain.fraHexEditBackground.Width
        
        intViewLine = LineMax
        
        intOriginX = 0
        If intOriginY > intLine - LineMax Then
            intOriginY = intLine - LineMax
        End If
        
    Else
        frmMain.hsclHexEdit.Visible = True
        frmMain.vsclHexEdit.Visible = True
        frmMain.hsclHexEdit.Width = frmMain.fraHexEditBackground.Width - frmMain.vsclHexEdit.Width
        intViewLine = LineMax - 1
        If intOriginX > intViewWidth - frmMain.fraHexEditBackground.Width Then
            intOriginX = intViewWidth - frmMain.fraHexEditBackground.Width
        End If
        If intOriginY > intLine - LineMax + 1 Then
            intOriginY = intLine - LineMax + 1
        End If
    End If
    
    
    
    frmMain.txtHexEditAddress.Left = intOriginX
    frmMain.txtHexEditHex.Left = intOriginX + frmMain.txtHexEditAddress.Width * intAddressChk
    frmMain.txtHexEditText.Left = intOriginX + frmMain.txtHexEditAddress.Width * intAddressChk + frmMain.txtHexEditHex.Width * intHexChk
    frmMain.txtBlank.Left = intOriginX + frmMain.txtHexEditAddress.Width * intAddressChk + frmMain.txtHexEditHex.Width * intHexChk + frmMain.txtHexEditText.Width * intAsciiChk
    
    intStart = intOriginY * (6 + 4 * intAdd48Chk) + 1
    intLenth = intViewLine * (6 + 4 * intAdd48Chk)
    strDisplayAddress = Mid(strAddress, intStart, intLenth)
    
    intStart = intOriginY * (intHexWidth * 4 + 2) + 1
    intLenth = intViewLine * (intHexWidth * 4 + 2)
    strDisplayHex = Mid(strHex, intStart, intLenth)
    
    intStart = intOriginY * (intHexWidth + 2) + 1
    intLenth = intViewLine * (intHexWidth + 2)
    strDisplayAscii = Mid(strAscii, intStart, intLenth)
    
    
    
    '***************************************
    
    '***************************************
    '設置滾動條
    '***************************************
    
    frmMain.vsclHexEdit.Max = intLine - intViewLine
    frmMain.hsclHexEdit.Max = (intViewWidth - frmMain.fraHexEditBackground.Width) \ ChrWidth + 1
    
    
    '***************************************
    
    
    
    
    
    '***************************************
    '顯示輸出
    '***************************************
    frmMain.txtHexEditHex.Text = strDisplayHex
    frmMain.txtHexEditText.Text = strDisplayAscii
    frmMain.txtHexEditAddress.Text = strDisplayAddress
    
    '***************************************
    
    
End Sub

'******************************************
'文本無變化的刷新
'******************************************

Public Sub ScrollRedisplay()

    Call display
    
End Sub

'******************************************
'文本發生變化的刷新
'******************************************

Public Sub SlideRedisplay()
    
    Call GetDisplayText
    Call display

End Sub



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91欧美一区二区| 中文字幕在线不卡国产视频| 亚洲欧美综合色| 亚洲一区在线看| 成人av片在线观看| 日韩美女天天操| 亚洲一区影音先锋| 不卡的av电影| 欧美激情一区二区三区全黄| 免费在线观看一区二区三区| 色婷婷亚洲一区二区三区| 精品国产髙清在线看国产毛片| 亚洲自拍偷拍综合| 96av麻豆蜜桃一区二区| 国产午夜一区二区三区| 麻豆精品一区二区综合av| 欧美性猛交xxxx黑人交| 国产精品久久久久影视| 国产高清视频一区| 久久综合五月天婷婷伊人| 全国精品久久少妇| 9191成人精品久久| 日韩激情视频在线观看| 欧美日韩一区中文字幕| 亚洲一区二区三区四区在线观看 | 国产精品久久久久影院| 国产精品一区2区| 久久精品一区八戒影视| 国产盗摄一区二区| 国产精品美女久久久久久久久 | 美女视频一区在线观看| 8v天堂国产在线一区二区| 一区二区日韩av| 在线看国产一区| 香蕉影视欧美成人| 日韩视频123| 精品亚洲欧美一区| 久久久国产综合精品女国产盗摄| 国内精品久久久久影院色| 精品国产乱码久久久久久久| 国产美女精品一区二区三区| 久久众筹精品私拍模特| 成人激情电影免费在线观看| 中文字幕亚洲一区二区av在线| 懂色中文一区二区在线播放| 日韩美女啊v在线免费观看| 色偷偷一区二区三区| 午夜精品久久久久影视| 精品国产乱码久久久久久牛牛| 国产精品一二三区| 亚洲欧美日韩国产成人精品影院| 欧美午夜视频网站| 国内精品写真在线观看| 成人免费一区二区三区在线观看| 欧美在线一区二区三区| 男人的天堂亚洲一区| 国产欧美一区二区三区在线看蜜臀| 成人av先锋影音| 天堂一区二区在线| 久久精品一级爱片| 在线观看www91| 国产中文字幕精品| 亚洲一区在线看| 亚洲精品一区二区三区精华液| 99国内精品久久| 美女久久久精品| 成人免费在线观看入口| 日韩视频在线观看一区二区| www.av精品| 男人的天堂亚洲一区| 中文字幕永久在线不卡| 777色狠狠一区二区三区| 成人国产精品免费观看视频| 午夜久久久久久久久久一区二区| 国产亚洲欧美日韩日本| 欧美日本一区二区三区| 9色porny自拍视频一区二区| 伦理电影国产精品| 亚洲伊人伊色伊影伊综合网| 国产日韩精品一区二区三区在线| 欧美日韩一卡二卡三卡| fc2成人免费人成在线观看播放| 日韩国产精品久久久久久亚洲| 亚洲视频免费在线观看| 精品1区2区在线观看| 欧美日韩亚洲综合| www.日韩精品| 国产suv精品一区二区三区| 免费不卡在线视频| 夜夜揉揉日日人人青青一国产精品| 欧美成人bangbros| 欧美一区二区观看视频| 色噜噜夜夜夜综合网| 成人一区二区三区在线观看| 久久se精品一区二区| 日韩精品电影在线观看| 亚洲一区二区三区免费视频| 亚洲欧洲一区二区三区| 国产女人aaa级久久久级| 日韩一区二区三区精品视频| 欧美性大战xxxxx久久久| 色综合久久久久网| 91猫先生在线| 一本色道久久综合亚洲aⅴ蜜桃| 成人精品一区二区三区四区 | 久久99精品国产麻豆不卡| 日韩专区中文字幕一区二区| 亚洲国产一区视频| 亚洲一区二区三区在线看| 亚洲一区av在线| 婷婷亚洲久悠悠色悠在线播放| 亚洲一级在线观看| 天天综合天天综合色| 日韩电影在线免费看| 免费精品视频最新在线| 美美哒免费高清在线观看视频一区二区| 日本亚洲三级在线| 麻豆中文一区二区| 久久超碰97中文字幕| 国产精品99久久久久| 成人av在线网| 91色porny蝌蚪| 欧美亚洲国产一区在线观看网站| 欧日韩精品视频| 911精品产国品一二三产区| 日韩精品一区二区在线观看| 久久这里只有精品6| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 国产午夜一区二区三区| 国产精品―色哟哟| 一区二区三区在线视频免费| 亚洲123区在线观看| 日本不卡视频在线观看| 国产成人亚洲综合a∨猫咪| 99国内精品久久| 91精品国产91久久久久久一区二区| 欧美电影免费提供在线观看| 国产欧美一区二区三区鸳鸯浴 | 日本一区二区久久| 亚洲乱码精品一二三四区日韩在线| 一区二区三区四区蜜桃 | www国产精品av| 日韩理论片中文av| 日韩福利电影在线观看| 丁香激情综合国产| 欧美三级欧美一级| 久久久久久久久99精品| 亚洲欧美色一区| 久久国产婷婷国产香蕉| 91蜜桃网址入口| 精品伦理精品一区| 亚洲欧美日韩电影| 国产一区二区三区四区在线观看| 91美女在线看| 久久九九久久九九| 亚洲一区在线看| 成人综合婷婷国产精品久久| 欧美日韩国产a| 国产精品电影一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 成人听书哪个软件好| 欧美日韩精品系列| 国产精品美女视频| 91精品综合久久久久久| 2023国产精品视频| 亚洲超丰满肉感bbw| 大桥未久av一区二区三区中文| 欧美日韩国产美女| 亚洲日本在线天堂| 国产成人鲁色资源国产91色综| 51久久夜色精品国产麻豆| 亚洲视频小说图片| 国产成人免费视频一区| 91精品国产麻豆国产自产在线| 亚洲三级电影网站| 成人一区二区三区中文字幕| 精品噜噜噜噜久久久久久久久试看 | 欧美日韩三级一区| 一区在线观看视频| 成人免费视频caoporn| 久久久国产精品麻豆| 韩国av一区二区三区在线观看| 欧美裸体bbwbbwbbw| 亚洲欧美激情在线| jlzzjlzz亚洲女人18| 国产调教视频一区| 国产精品白丝jk黑袜喷水| 欧美日韩国产影片| 136国产福利精品导航| 国产精品99久久久久久久女警 | 一区二区三区蜜桃网| av在线不卡观看免费观看| 国产亚洲一区二区三区四区| 国产呦萝稀缺另类资源| 91精品国产综合久久蜜臀| 日韩av电影天堂| 日韩一级免费一区| 激情六月婷婷久久| 精品国产欧美一区二区| 精品一区二区三区影院在线午夜 |