亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
制服.丝袜.亚洲.另类.中文| 亚洲图片激情小说| av在线这里只有精品| 日本aⅴ亚洲精品中文乱码| 亚洲私人黄色宅男| 秋霞午夜鲁丝一区二区老狼| 欧美久久久久久久久久| 成人黄色小视频在线观看| 国产一区二区福利| 国产一区二区三区香蕉| 91福利国产精品| 在线观看视频一区二区欧美日韩| 91在线观看高清| 色综合久久久久| 欧美性xxxxx极品少妇| 欧美视频一区二区在线观看| 国产视频一区在线观看| 国产精品久久影院| 一区二区三区在线播| 欧美一区二区在线视频| 91在线视频网址| 久久91精品久久久久久秒播| 日韩一区欧美小说| 精品国产乱码久久久久久蜜臀 | 粉嫩av一区二区三区| 亚洲午夜一区二区三区| 久久这里只精品最新地址| 欧美性受xxxx| 日韩视频国产视频| 在线观看日韩国产| 91精品国产色综合久久不卡电影 | 美国三级日本三级久久99| 亚洲天天做日日做天天谢日日欢 | 欧洲国内综合视频| 欧美一级日韩不卡播放免费| 国产亚洲成aⅴ人片在线观看| 国产精品成人在线观看| 日韩电影在线观看一区| 一区二区三区精品在线| 麻豆国产欧美一区二区三区| 成人黄色在线看| 日韩亚洲欧美高清| 亚洲视频中文字幕| 激情文学综合网| 久久国产精品99久久久久久老狼| 亚洲第一福利一区| 日本亚洲视频在线| 东方aⅴ免费观看久久av| 在线观看日韩电影| 成人国产电影网| 亚洲色图清纯唯美| 欧美三级蜜桃2在线观看| 99久精品国产| 色诱视频网站一区| 国产欧美日韩激情| 国产肉丝袜一区二区| 手机精品视频在线观看| 日韩主播视频在线| av在线播放一区二区三区| 日韩精品一区二区三区中文精品| 欧美一级片免费看| 亚洲影院在线观看| 秋霞影院一区二区| 欧美亚洲动漫另类| 亚洲男人的天堂网| 亚洲大型综合色站| 91美女片黄在线观看91美女| 久久久精品tv| 一区二区三区日韩精品视频| 成人一区在线看| 99久久er热在这里只有精品66| 26uuu精品一区二区三区四区在线| 香蕉成人伊视频在线观看| 色婷婷狠狠综合| 中文字幕久久午夜不卡| 亚洲四区在线观看| 99精品国产99久久久久久白柏| 日本一区二区三区四区| 国产精品一区二区久久精品爱涩 | 成人污视频在线观看| 日韩美一区二区三区| 麻豆国产欧美日韩综合精品二区| 欧美丝袜丝nylons| 国产又黄又大久久| 久久嫩草精品久久久久| 国产在线精品一区在线观看麻豆| 欧美成人性战久久| 亚洲桃色在线一区| 欧美综合亚洲图片综合区| 亚洲精品视频在线观看网站| 精品综合免费视频观看| 精品国产乱码久久久久久久| 久久99精品一区二区三区三区| 精品国产免费一区二区三区香蕉| 精久久久久久久久久久| 国产午夜精品一区二区三区视频| 高清国产午夜精品久久久久久| 国产精品国产三级国产有无不卡| 99久久久久久| 亚洲国产美女搞黄色| 日韩一区二区精品| 国产精品一区二区在线播放| 国产精品人人做人人爽人人添| 亚洲国产日日夜夜| 7777精品伊人久久久大香线蕉完整版| 午夜国产不卡在线观看视频| 色香蕉久久蜜桃| 午夜精品免费在线| 久久婷婷国产综合国色天香| 成av人片一区二区| 亚洲高清不卡在线| 久久天天做天天爱综合色| 北条麻妃国产九九精品视频| 亚洲午夜精品在线| 久久免费电影网| 91国产精品成人| 国模套图日韩精品一区二区| 国产精品麻豆99久久久久久| 欧美性猛片aaaaaaa做受| 免费高清视频精品| 免费观看久久久4p| 国产精品麻豆网站| 欧美一区二区性放荡片| 97久久人人超碰| 免费观看一级特黄欧美大片| 国产精品乱码久久久久久| 这里只有精品免费| 色综合视频在线观看| 国产一区二区三区在线看麻豆| 亚洲九九爱视频| 国产欧美一区二区精品性色超碰 | 色婷婷久久99综合精品jk白丝| 久久se这里有精品| 亚洲一级二级在线| 日韩一区在线播放| 国产日韩欧美不卡在线| 欧美一区二区三区在线观看视频| 一本色道久久综合亚洲91| 国产精品77777| 精品亚洲aⅴ乱码一区二区三区| 一区二区三区在线免费播放| 国产精品女人毛片| 亚洲精品一区二区三区影院| 538在线一区二区精品国产| 99精品视频在线播放观看| 成人丝袜高跟foot| 国产精品一品二品| 国产一区欧美二区| 久久99国产精品免费| 蜜桃在线一区二区三区| 午夜精品免费在线观看| 亚洲成在线观看| 亚洲国产美国国产综合一区二区| 亚洲人成电影网站色mp4| 国产精品天天摸av网| 欧美激情自拍偷拍| 国产精品美女一区二区三区| 久久精品亚洲乱码伦伦中文| 精品国产伦一区二区三区观看体验| 91精品婷婷国产综合久久| 欧美一区二区私人影院日本| 欧美疯狂性受xxxxx喷水图片| 欧美日韩一区二区三区免费看| 欧美在线啊v一区| 亚洲国产裸拍裸体视频在线观看乱了| 激情综合色播激情啊| 在线视频中文字幕一区二区| 国产亚洲欧美色| 亚洲成精国产精品女| 国产日韩欧美综合在线| 日韩视频国产视频| 国产亚洲短视频| 亚洲欧美区自拍先锋| 亚洲另类在线视频| 三级欧美韩日大片在线看| 青青草97国产精品免费观看无弹窗版| 久久精工是国产品牌吗| 国产成人亚洲精品狼色在线 | 亚洲欧洲另类国产综合| 国产精品久久久久久久浪潮网站| 亚洲欧美激情小说另类| 亚洲福利视频导航| 久久机这里只有精品| 国产成人日日夜夜| 在线观看视频欧美| 日韩欧美电影在线| 综合自拍亚洲综合图不卡区| 亚洲五月六月丁香激情| 精品在线一区二区| 99久久精品国产毛片| 91精品国产aⅴ一区二区| 日本一区二区三区四区在线视频| 亚洲欧洲精品一区二区三区| 丝袜美腿成人在线| 国产不卡高清在线观看视频| 欧美羞羞免费网站| 国产农村妇女毛片精品久久麻豆| 亚洲日本在线a| 国产乱妇无码大片在线观看| 在线看国产日韩|