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

📄 form1.vb

📁 wince平台 modbus通讯 modbus tcp master vb.net的一个例子程序
💻 VB
📖 第 1 页 / 共 2 页
字号:
Imports Wincon
Public Class Form1
    Inherits System.Windows.Forms.Form
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Dim m_list1, m_list2 As Integer
    Dim m_WCoilAd, m_WRegAd, m_WCoilVal As Integer
    Dim m_WRegVal As Short

#Region " Windows Form Designer generated code "

    Public Sub New()

        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        MyBase.Dispose(disposing)
    End Sub

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents Button4 As System.Windows.Forms.Button
    Friend WithEvents Button5 As System.Windows.Forms.Button
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents TextBox13 As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents TextBox14 As System.Windows.Forms.TextBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents TextBox15 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox16 As System.Windows.Forms.TextBox
    Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
    Friend WithEvents ListBox2 As System.Windows.Forms.ListBox
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Private Sub InitializeComponent()
        Me.Button1 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.Button3 = New System.Windows.Forms.Button
        Me.Button4 = New System.Windows.Forms.Button
        Me.Button5 = New System.Windows.Forms.Button
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.TextBox3 = New System.Windows.Forms.TextBox
        Me.TextBox4 = New System.Windows.Forms.TextBox
        Me.TextBox5 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.TextBox6 = New System.Windows.Forms.TextBox
        Me.TextBox7 = New System.Windows.Forms.TextBox
        Me.TextBox8 = New System.Windows.Forms.TextBox
        Me.TextBox9 = New System.Windows.Forms.TextBox
        Me.TextBox10 = New System.Windows.Forms.TextBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.TextBox13 = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.TextBox14 = New System.Windows.Forms.TextBox
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.TextBox15 = New System.Windows.Forms.TextBox
        Me.TextBox16 = New System.Windows.Forms.TextBox
        Me.ListBox1 = New System.Windows.Forms.ListBox
        Me.ListBox2 = New System.Windows.Forms.ListBox
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(288, 8)
        Me.Button1.Text = "Create"
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(288, 64)
        Me.Button2.Text = "RCoils"
        '
        'Button3
        '
        Me.Button3.Location = New System.Drawing.Point(288, 128)
        Me.Button3.Text = "RRegs"
        '
        'Button4
        '
        Me.Button4.Location = New System.Drawing.Point(288, 176)
        Me.Button4.Text = "WCoil"
        '
        'Button5
        '
        Me.Button5.Location = New System.Drawing.Point(288, 216)
        Me.Button5.Text = "WReg"
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(8, 64)
        Me.TextBox1.Size = New System.Drawing.Size(24, 22)
        Me.TextBox1.Text = "0"
        '
        'TextBox2
        '
        Me.TextBox2.Location = New System.Drawing.Point(40, 64)
        Me.TextBox2.Size = New System.Drawing.Size(24, 22)
        Me.TextBox2.Text = "0"
        '
        'TextBox3
        '
        Me.TextBox3.Location = New System.Drawing.Point(72, 64)
        Me.TextBox3.Size = New System.Drawing.Size(24, 22)
        Me.TextBox3.Text = "0"
        '
        'TextBox4
        '
        Me.TextBox4.Location = New System.Drawing.Point(104, 64)
        Me.TextBox4.Size = New System.Drawing.Size(24, 22)
        Me.TextBox4.Text = "0"
        '
        'TextBox5
        '
        Me.TextBox5.Location = New System.Drawing.Point(136, 64)
        Me.TextBox5.Size = New System.Drawing.Size(24, 22)
        Me.TextBox5.Text = "0"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(8, 8)
        Me.Label1.Size = New System.Drawing.Size(56, 20)
        Me.Label1.Text = "COM Port"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(8, 176)
        Me.Label2.Size = New System.Drawing.Size(88, 20)
        Me.Label2.Text = "Write Address"
        '
        'TextBox6
        '
        Me.TextBox6.Location = New System.Drawing.Point(8, 128)
        Me.TextBox6.Size = New System.Drawing.Size(48, 22)
        Me.TextBox6.Text = "0"
        '
        'TextBox7
        '
        Me.TextBox7.Location = New System.Drawing.Point(64, 128)
        Me.TextBox7.Size = New System.Drawing.Size(48, 22)
        Me.TextBox7.Text = "0"
        '
        'TextBox8
        '
        Me.TextBox8.Location = New System.Drawing.Point(120, 128)
        Me.TextBox8.Size = New System.Drawing.Size(48, 22)
        Me.TextBox8.Text = "0"
        '
        'TextBox9
        '
        Me.TextBox9.Location = New System.Drawing.Point(176, 128)
        Me.TextBox9.Size = New System.Drawing.Size(48, 22)
        Me.TextBox9.Text = "0"
        '
        'TextBox10
        '
        Me.TextBox10.Location = New System.Drawing.Point(232, 128)
        Me.TextBox10.Size = New System.Drawing.Size(48, 22)
        Me.TextBox10.Text = "0"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(112, 8)
        Me.Label3.Size = New System.Drawing.Size(48, 20)
        Me.Label3.Text = "Baudrate"
        '
        'TextBox13
        '
        Me.TextBox13.Location = New System.Drawing.Point(96, 176)
        Me.TextBox13.Size = New System.Drawing.Size(24, 22)
        Me.TextBox13.Text = "7"
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(152, 176)
        Me.Label4.Size = New System.Drawing.Size(32, 20)
        Me.Label4.Text = "Value"
        '
        'TextBox14
        '
        Me.TextBox14.Location = New System.Drawing.Point(192, 176)
        Me.TextBox14.Size = New System.Drawing.Size(24, 22)
        Me.TextBox14.Text = "1"
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(8, 216)

⌨️ 快捷键说明

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