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

📄 form1.vb

📁 汽车领can总线通讯程序
💻 VB
📖 第 1 页 / 共 4 页
字号:
' Sample program for Visual Basic .NET
' application file v1.41, 2006-06-20 Stm, bac
' (c) Vector Informatik GmbH 

Option Explicit On 
Imports System.Runtime.InteropServices

Public Class Form1
	Inherits System.Windows.Forms.Form

#Region " Vom Windows Form Designer generierter Code "

    Public Sub New()
        MyBase.New()

        ' Dieser Aufruf ist f黵 den Windows Form-Designer erforderlich.
        InitializeComponent()

        ' Initialisierungen nach dem Aufruf InitializeComponent() hinzuf黦en

    End Sub

    ' Die Form 黚erschreibt den L鰏chvorgang der Basisklasse, um Komponenten zu bereinigen.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    ' F黵 Windows Form-Designer erforderlich
    Private components As System.ComponentModel.IContainer

    'HINWEIS: Die folgende Prozedur ist f黵 den Windows Form-Designer erforderlich
    'Sie kann mit dem Windows Form-Designer modifiziert werden.
    'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
    Friend WithEvents Output As System.Windows.Forms.ListBox
    Friend WithEvents BnCloseApp As System.Windows.Forms.Button
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Databytes As System.Windows.Forms.Label
    Friend WithEvents CBox_RTRBit As System.Windows.Forms.ComboBox
    Friend WithEvents CBoxHardwareType As System.Windows.Forms.ComboBox
    Friend WithEvents CBoxCanMsgType As System.Windows.Forms.ComboBox
    Friend WithEvents Tbox_CanDlc As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData7 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData6 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData5 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData4 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData3 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData2 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData1 As System.Windows.Forms.TextBox
    Friend WithEvents TBoxData0 As System.Windows.Forms.TextBox
    Friend WithEvents BnSendCANMsg As System.Windows.Forms.Button
    Friend WithEvents TBoxCanId As System.Windows.Forms.TextBox
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents BnClear As System.Windows.Forms.Button
    Friend WithEvents BnShowVecHardwControl As System.Windows.Forms.Button
    Friend WithEvents Bn_ResetClock As System.Windows.Forms.Button
    Friend WithEvents BnTxReceipt As System.Windows.Forms.Button
    Friend WithEvents BnFlushTXQueue As System.Windows.Forms.Button
    Friend WithEvents BnFlushRXQueue As System.Windows.Forms.Button
    Friend WithEvents BnActivateChannels As System.Windows.Forms.Button
    Friend WithEvents BnCanAck As System.Windows.Forms.Button
    Friend WithEvents BnRXQueueLevel As System.Windows.Forms.Button
    Friend WithEvents BnChipstate As System.Windows.Forms.Button
    Friend WithEvents BnResetAccepFilter As System.Windows.Forms.Button
    Friend WithEvents GroupCanMessage As System.Windows.Forms.GroupBox
    Friend WithEvents GroupCANSetup As System.Windows.Forms.GroupBox
    Friend WithEvents GroupAcceptance As System.Windows.Forms.GroupBox
    Friend WithEvents BnDriverStatus As System.Windows.Forms.Button
    Friend WithEvents GroupCanSpecial As System.Windows.Forms.GroupBox
    Friend WithEvents GroupAfterOpenPort As System.Windows.Forms.GroupBox
    Friend WithEvents BnGetSyncTime As System.Windows.Forms.Button
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents BnCanAcceptReset As System.Windows.Forms.Button
    Friend WithEvents TBoxCanAcceptTo As System.Windows.Forms.TextBox
    Friend WithEvents TBoxCanAcceptFrom As System.Windows.Forms.TextBox
    Friend WithEvents CBoxBitrate As System.Windows.Forms.ComboBox
    Friend WithEvents BnGetDriverConfig As System.Windows.Forms.Button
	Friend WithEvents Bn_ReceiveMode As System.Windows.Forms.Button
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Output = New System.Windows.Forms.ListBox
        Me.BnCloseApp = New System.Windows.Forms.Button
        Me.TBoxCanId = New System.Windows.Forms.TextBox
        Me.GroupCanMessage = New System.Windows.Forms.GroupBox
        Me.BnSendCANMsg = New System.Windows.Forms.Button
        Me.CBoxCanMsgType = New System.Windows.Forms.ComboBox
        Me.CBox_RTRBit = New System.Windows.Forms.ComboBox
        Me.TBoxData7 = New System.Windows.Forms.TextBox
        Me.TBoxData6 = New System.Windows.Forms.TextBox
        Me.TBoxData5 = New System.Windows.Forms.TextBox
        Me.TBoxData4 = New System.Windows.Forms.TextBox
        Me.TBoxData3 = New System.Windows.Forms.TextBox
        Me.TBoxData2 = New System.Windows.Forms.TextBox
        Me.TBoxData1 = New System.Windows.Forms.TextBox
        Me.TBoxData0 = New System.Windows.Forms.TextBox
        Me.Databytes = New System.Windows.Forms.Label
        Me.Tbox_CanDlc = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.GroupCANSetup = New System.Windows.Forms.GroupBox
        Me.BnGetDriverConfig = New System.Windows.Forms.Button
        Me.CBoxBitrate = New System.Windows.Forms.ComboBox
        Me.BnDriverStatus = New System.Windows.Forms.Button
        Me.BnActivateChannels = New System.Windows.Forms.Button
        Me.CBoxHardwareType = New System.Windows.Forms.ComboBox
        Me.BnCanAck = New System.Windows.Forms.Button
        Me.BnTxReceipt = New System.Windows.Forms.Button
        Me.Bn_ResetClock = New System.Windows.Forms.Button
        Me.BnClear = New System.Windows.Forms.Button
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.BnShowVecHardwControl = New System.Windows.Forms.Button
        Me.GroupAcceptance = New System.Windows.Forms.GroupBox
        Me.BnCanAcceptReset = New System.Windows.Forms.Button
        Me.Label4 = New System.Windows.Forms.Label
        Me.TBoxCanAcceptTo = New System.Windows.Forms.TextBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.TBoxCanAcceptFrom = New System.Windows.Forms.TextBox
        Me.BnResetAccepFilter = New System.Windows.Forms.Button
        Me.BnFlushTXQueue = New System.Windows.Forms.Button
        Me.BnFlushRXQueue = New System.Windows.Forms.Button
        Me.BnRXQueueLevel = New System.Windows.Forms.Button
        Me.BnChipstate = New System.Windows.Forms.Button
        Me.BnGetSyncTime = New System.Windows.Forms.Button
        Me.GroupCanSpecial = New System.Windows.Forms.GroupBox
        Me.GroupAfterOpenPort = New System.Windows.Forms.GroupBox
        Me.Bn_ReceiveMode = New System.Windows.Forms.Button
        Me.GroupCanMessage.SuspendLayout()
        Me.GroupCANSetup.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        Me.GroupAcceptance.SuspendLayout()
        Me.GroupCanSpecial.SuspendLayout()
        Me.GroupAfterOpenPort.SuspendLayout()
        Me.SuspendLayout()
        '
        'Output
        '
        Me.Output.Location = New System.Drawing.Point(344, 0)
        Me.Output.Name = "Output"
        Me.Output.ScrollAlwaysVisible = True
        Me.Output.Size = New System.Drawing.Size(480, 407)
        Me.Output.TabIndex = 0
        '
        'BnCloseApp
        '
        Me.BnCloseApp.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.BnCloseApp.Location = New System.Drawing.Point(8, 16)
        Me.BnCloseApp.Name = "BnCloseApp"
        Me.BnCloseApp.Size = New System.Drawing.Size(96, 23)
        Me.BnCloseApp.TabIndex = 1
        Me.BnCloseApp.Text = "Close"
        '
        'TBoxCanId
        '
        Me.TBoxCanId.Location = New System.Drawing.Point(32, 24)
        Me.TBoxCanId.Name = "TBoxCanId"
        Me.TBoxCanId.Size = New System.Drawing.Size(32, 20)
        Me.TBoxCanId.TabIndex = 2
        Me.TBoxCanId.Text = "1"
        Me.TBoxCanId.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'GroupCanMessage
        '
        Me.GroupCanMessage.Controls.Add(Me.BnSendCANMsg)
        Me.GroupCanMessage.Controls.Add(Me.CBoxCanMsgType)
        Me.GroupCanMessage.Controls.Add(Me.CBox_RTRBit)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData7)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData6)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData5)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData4)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData3)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData2)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData1)
        Me.GroupCanMessage.Controls.Add(Me.TBoxData0)
        Me.GroupCanMessage.Controls.Add(Me.Databytes)
        Me.GroupCanMessage.Controls.Add(Me.Tbox_CanDlc)
        Me.GroupCanMessage.Controls.Add(Me.Label2)
        Me.GroupCanMessage.Controls.Add(Me.Label1)
        Me.GroupCanMessage.Controls.Add(Me.TBoxCanId)
        Me.GroupCanMessage.Location = New System.Drawing.Point(8, 248)
        Me.GroupCanMessage.Name = "GroupCanMessage"
        Me.GroupCanMessage.Size = New System.Drawing.Size(328, 112)
        Me.GroupCanMessage.TabIndex = 3
        Me.GroupCanMessage.TabStop = False
        Me.GroupCanMessage.Text = "CAN Message"
        '
        'BnSendCANMsg
        '
        Me.BnSendCANMsg.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.BnSendCANMsg.Location = New System.Drawing.Point(200, 80)
        Me.BnSendCANMsg.Name = "BnSendCANMsg"
        Me.BnSendCANMsg.Size = New System.Drawing.Size(120, 24)
        Me.BnSendCANMsg.TabIndex = 18
        Me.BnSendCANMsg.Text = "Transmit Message"
        '
        'CBoxCanMsgType
        '
        Me.CBoxCanMsgType.Items.AddRange(New Object() {"Standard", "Extended"})
        Me.CBoxCanMsgType.Location = New System.Drawing.Point(136, 24)
        Me.CBoxCanMsgType.Name = "CBoxCanMsgType"
        Me.CBoxCanMsgType.Size = New System.Drawing.Size(80, 21)
        Me.CBoxCanMsgType.TabIndex = 17
        '
        'CBox_RTRBit
        '
        Me.CBox_RTRBit.Items.AddRange(New Object() {"Dataframe", "Remoteframe"})
        Me.CBox_RTRBit.Location = New System.Drawing.Point(224, 24)
        Me.CBox_RTRBit.Name = "CBox_RTRBit"
        Me.CBox_RTRBit.Size = New System.Drawing.Size(96, 21)
        Me.CBox_RTRBit.TabIndex = 16
        '
        'TBoxData7
        '
        Me.TBoxData7.Location = New System.Drawing.Point(296, 56)
        Me.TBoxData7.Name = "TBoxData7"
        Me.TBoxData7.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData7.TabIndex = 15
        Me.TBoxData7.Text = "255"
        Me.TBoxData7.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData6
        '
        Me.TBoxData6.Location = New System.Drawing.Point(264, 56)
        Me.TBoxData6.Name = "TBoxData6"
        Me.TBoxData6.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData6.TabIndex = 14
        Me.TBoxData6.Text = "7"
        Me.TBoxData6.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData5
        '
        Me.TBoxData5.Location = New System.Drawing.Point(232, 56)
        Me.TBoxData5.Name = "TBoxData5"
        Me.TBoxData5.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData5.TabIndex = 13
        Me.TBoxData5.Text = "6"
        Me.TBoxData5.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData4
        '
        Me.TBoxData4.Location = New System.Drawing.Point(200, 56)
        Me.TBoxData4.Name = "TBoxData4"
        Me.TBoxData4.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData4.TabIndex = 12
        Me.TBoxData4.Text = "5"
        Me.TBoxData4.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData3
        '
        Me.TBoxData3.Location = New System.Drawing.Point(168, 56)
        Me.TBoxData3.Name = "TBoxData3"
        Me.TBoxData3.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData3.TabIndex = 11
        Me.TBoxData3.Text = "4"
        Me.TBoxData3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData2
        '
        Me.TBoxData2.Location = New System.Drawing.Point(136, 56)
        Me.TBoxData2.Name = "TBoxData2"
        Me.TBoxData2.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData2.TabIndex = 10
        Me.TBoxData2.Text = "3"
        Me.TBoxData2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData1
        '
        Me.TBoxData1.Location = New System.Drawing.Point(104, 56)
        Me.TBoxData1.Name = "TBoxData1"
        Me.TBoxData1.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData1.TabIndex = 9
        Me.TBoxData1.Text = "2"
        Me.TBoxData1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TBoxData0
        '
        Me.TBoxData0.Location = New System.Drawing.Point(72, 56)
        Me.TBoxData0.Name = "TBoxData0"
        Me.TBoxData0.Size = New System.Drawing.Size(24, 20)
        Me.TBoxData0.TabIndex = 8
        Me.TBoxData0.Text = "1"
        Me.TBoxData0.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Databytes
        '
        Me.Databytes.Location = New System.Drawing.Point(8, 64)
        Me.Databytes.Name = "Databytes"
        Me.Databytes.Size = New System.Drawing.Size(56, 16)
        Me.Databytes.TabIndex = 7
        Me.Databytes.Text = "data bytes"
        '
        'Tbox_CanDlc
        '
        Me.Tbox_CanDlc.Location = New System.Drawing.Point(96, 24)
        Me.Tbox_CanDlc.Name = "Tbox_CanDlc"
        Me.Tbox_CanDlc.Size = New System.Drawing.Size(32, 20)
        Me.Tbox_CanDlc.TabIndex = 5
        Me.Tbox_CanDlc.Text = "8"
        Me.Tbox_CanDlc.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(72, 32)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(32, 16)
        Me.Label2.TabIndex = 4
        Me.Label2.Text = "DLC"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(8, 32)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(24, 16)
        Me.Label1.TabIndex = 3
        Me.Label1.Text = "ID"
        '
        'GroupCANSetup
        '
        Me.GroupCANSetup.Controls.Add(Me.BnGetDriverConfig)
        Me.GroupCANSetup.Controls.Add(Me.CBoxBitrate)

⌨️ 快捷键说明

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