⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 vb编写机器人遥控程序
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      Width           =   12375
      Begin VB.OptionButton Option2 
         Caption         =   "长度:30"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   9000
         TabIndex        =   5
         Top             =   240
         Value           =   -1  'True
         Width           =   1095
      End
      Begin VB.OptionButton Option1 
         Caption         =   "长度:外部"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   7800
         TabIndex        =   4
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton cmdManualSend 
         Caption         =   "发送"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6480
         TabIndex        =   2
         Top             =   120
         Width           =   615
      End
      Begin VB.ComboBox cboHexAscii 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         ItemData        =   "frmMain.frx":08CA
         Left            =   12000
         List            =   "frmMain.frx":08D4
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   120
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.TextBox txtSend 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   120
         TabIndex        =   3
         Text            =   "A5 0F 53 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30"
         Top             =   120
         Width           =   3975
      End
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   1800
      Top             =   120
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   390
      Left            =   0
      TabIndex        =   14
      Top             =   9180
      Width           =   15240
      _ExtentX        =   26882
      _ExtentY        =   688
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            TextSave        =   "2009-4-25"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            TextSave        =   "13:33"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Enabled         =   0   'False
            Object.Width           =   21220
         EndProperty
      EndProperty
   End
   Begin VB.Label Label33 
      Caption         =   "Label33 测试——隐藏"
      Height          =   255
      Left            =   240
      TabIndex        =   86
      Top             =   0
      Visible         =   0   'False
      Width           =   2295
   End
   Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1 
      Height          =   1095
      Left            =   720
      TabIndex        =   83
      Top             =   2280
      Visible         =   0   'False
      Width           =   855
      URL             =   ""
      rate            =   1
      balance         =   0
      currentPosition =   0
      defaultFrame    =   ""
      playCount       =   1
      autoStart       =   -1  'True
      currentMarker   =   0
      invokeURLs      =   -1  'True
      baseURL         =   ""
      volume          =   50
      mute            =   0   'False
      uiMode          =   "full"
      stretchToFit    =   0   'False
      windowlessVideo =   0   'False
      enabled         =   -1  'True
      enableContextMenu=   -1  'True
      fullScreen      =   0   'False
      SAMIStyle       =   ""
      SAMILang        =   ""
      SAMIFilename    =   ""
      captioningID    =   ""
      enableErrorDialogs=   0   'False
      _cx             =   1508
      _cy             =   1931
   End
   Begin VB.Label Label29 
      Caption         =   "Label29"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   11160
      TabIndex        =   11
      Top             =   360
      Visible         =   0   'False
      Width           =   3255
   End
   Begin VB.Label Label28 
      Caption         =   "Label28"
      Height          =   255
      Left            =   0
      TabIndex        =   7
      Top             =   120
      Visible         =   0   'False
      Width           =   8655
   End
   Begin VB.Label Label26 
      Caption         =   "Label26"
      Height          =   165
      Left            =   0
      TabIndex        =   6
      Top             =   0
      Visible         =   0   'False
      Width           =   12615
   End
   Begin VB.Menu MainMenu 
      Caption         =   "视频菜单"
      Begin VB.Menu mneuInitCard 
         Caption         =   "视频初初始化"
      End
      Begin VB.Menu menuSnapImage 
         Caption         =   "抓图"
      End
      Begin VB.Menu mneuAdjust 
         Caption         =   "颜色调节"
      End
      Begin VB.Menu menuStartRecord 
         Caption         =   "启动录像"
      End
      Begin VB.Menu menuStopRecord 
         Caption         =   "停止录像"
      End
      Begin VB.Menu menuExitProm 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu operation 
      Caption         =   "图像操作"
      Begin VB.Menu Series 
         Caption         =   "采序列"
      End
      Begin VB.Menu StopSnap 
         Caption         =   "停止采集"
      End
      Begin VB.Menu FreeVideo 
         Caption         =   "冻结视频"
      End
      Begin VB.Menu VideoSize 
         Caption         =   "视频尺寸"
         Enabled         =   0   'False
      End
      Begin VB.Menu DataCallBack 
         Caption         =   "数据"
         Visible         =   0   'False
      End
      Begin VB.Menu SavePicture 
         Caption         =   "保存"
      End
   End
   Begin VB.Menu relook 
      Caption         =   "记录查看"
      Begin VB.Menu addvideo 
         Caption         =   "加载视频"
      End
      Begin VB.Menu adddata 
         Caption         =   "加载数据"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim m_nSlot As Long
Dim m_boOpen As Boolean
Dim m_boRecord As Boolean
Dim m_boPause As Boolean
Dim CapName As Integer
Dim strTestn As String
 Dim mt As String
 Dim Forward As Boolean, Backward As Boolean, Leftw As Boolean, Rightw As Boolean
Function ConvertHexChr(str As String) As Integer
    
    Dim test As Integer
    
    test = Asc(str)
    If test >= Asc("0") And test <= Asc("9") Then
        test = test - Asc("0")
    ElseIf test >= Asc("a") And test <= Asc("f") Then
        test = test - Asc("a") + 10
    ElseIf test >= Asc("A") And test <= Asc("F") Then
        test = test - Asc("A") + 10
    Else
        test = -1                                       '出错信息
    End If
    ConvertHexChr = test
    
End Function

'**********************************
'字符串表示的十六进制数据转化为相应的字节串
'返回转化后的字节数
'**********************************

Function strHexToByteArray(strText As String, bytByte() As Byte) As Integer
    
    Dim HexData As Integer          '十六进制(二进制)数据字节对应值
    Dim hstr As String * 1          '高位字符
    Dim lstr As String * 1          '低位字符
    Dim HighHexData As Integer      '高位数值
    Dim LowHexData As Integer       '低位数值
    Dim HexDataLen As Integer       '字节数
    Dim StringLen As Integer        '字符串长度
    Dim Account As Integer          '计数
    Dim n%
    strTestn = ""                   '设初值
    HexDataLen = 0
    strHexToByteArray = 0
    
    StringLen = Len(strText)
    Account = StringLen \ 2
    ReDim bytByte(Account)
    
    For n = 1 To StringLen
    
        Do                                              '清除空格
            hstr = Mid(strText, n, 1)
            n = n + 1
            If (n - 1) > StringLen Then
                HexDataLen = HexDataLen - 1
                
                Exit For
            End If
        Loop While hstr = " "
        
        Do
            lstr = Mid(strText, n, 1)
            n = n + 1
            If (n - 1) > StringLen Then
                HexDataLen = HexDataLen - 1
                
                Exit For
            End If
        Loop While lstr = " "
        n = n - 1
        If n > StringLen Then
            HexDataLen = HexDataLen - 1
            Exit For
        End If
        
        HighHexData = ConvertHexChr(hstr)
        LowHexData = ConvertHexChr(lstr)
        
        If HighHexData = -1 Or LowHexData = -1 Then     '遇到非法字符中断转化
            HexDataLen = HexDataLen - 1
            
            Exit For
        Else
            
            HexData = HighHexData * 16 + LowHexData
            bytByte(HexDataLen) = HexData
            HexDataLen = HexDataLen + 1
            
            
        End If
                        
    Next n
    
    If HexDataLen > 0 Then                              '修正最后一次循环改变的数值
        HexDataLen = HexDataLen - 1
        ReDim Preserve bytByte(HexDataLen)
    Else
        ReDim Preserve bytByte(0)
    End If
    
    
    If StringLen = 0 Then                               '如果是空串,则不会进入循环体
        strHexToByteArray = 0
    Else
        strHexToByteArray = HexDataLen + 1
    End If
    
    
End Function




Private Sub adddata_Click()
Frame22(2).Visible = True
Line25.X1 = Shape21.left + Shape21.Width \ 2
Line26.X1 = Shape21.left + Shape21.Width \ 2
Line27.X1 = Shape21.left + Shape21.Width \ 2
Line25.Y1 = Shape21.top + Shape21.Height \ 2
Line26.Y1 = Shape21.top + Shape21.Height \ 2
Line27.Y1 = Shape21.top + Shape21.Height \ 2

Line25.X2 = Shape21.left + Shape21.Width \ 2 + Shape21.Width \ 2 - 100
Line26.X2 = Shape21.left + Shape21.Width \ 2 + Shape21.Width \ 2 - 100
Line27.X2 = Shape21.left + Shape21.Width \ 2 + Shape21.Width \ 2 - 200
Line25.Y2 = Sha

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -