Option Strict Off
Option Explicit On 
Imports VB = Microsoft.VisualBasic

Public Class Slave
    Inherits System.Windows.Forms.Form

#Region " Windows tH[ fUCiŐꂽR[h "

    Public Sub New()
        MyBase.New()

        ' ̌Ăяo Windows tH[ fUCiŕKvłB
        InitializeComponent()

        ' InitializeComponent() Ăяǒɏǉ܂B

    End Sub

    ' Form  dispose I[o[ChăR|[lgꗗ܂B
    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

    ' Windows tH[ fUCiŕKvłB
    Private components As System.ComponentModel.IContainer

    '  : ȉ̃vV[ẂAWindows tH[ fUCiŕKvłB
    ' Windows tH[ fUCigĕύXĂB  
    ' R[h GfB^͎gpȂłB
    Public WithEvents Frame5 As System.Windows.Forms.GroupBox
    Public WithEvents optSrqSend As System.Windows.Forms.RadioButton
    Public WithEvents optSrqNotSend As System.Windows.Forms.RadioButton
    Public WithEvents txtSPollStb As System.Windows.Forms.TextBox
    Public WithEvents cmdSendSrq As System.Windows.Forms.Button
    Public WithEvents Label6 As System.Windows.Forms.Label
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents cmdRetDel As System.Windows.Forms.Button
    Public WithEvents cmdDataDel As System.Windows.Forms.Button
    Public WithEvents Frame4 As System.Windows.Forms.GroupBox
    Public WithEvents optPPollResponseIst1 As System.Windows.Forms.RadioButton
    Public WithEvents cmdParallelpollSetting As System.Windows.Forms.Button
    Public WithEvents optPPollResponseIst0 As System.Windows.Forms.RadioButton
    Public WithEvents optPPollResponseSrq As System.Windows.Forms.RadioButton
    Public WithEvents optPPollResponseNot As System.Windows.Forms.RadioButton
    Public WithEvents Frame3 As System.Windows.Forms.GroupBox
    Public WithEvents lstRet As System.Windows.Forms.ListBox
    Public WithEvents Frame2 As System.Windows.Forms.GroupBox
    Public WithEvents cmdRec As System.Windows.Forms.Button
    Public WithEvents cmdSend As System.Windows.Forms.Button
    Public WithEvents txtRec As System.Windows.Forms.TextBox
    Public WithEvents txtSend As System.Windows.Forms.TextBox
    Public WithEvents cmdExit As System.Windows.Forms.Button
    Public WithEvents cmdInit As System.Windows.Forms.Button
    Public WithEvents Frame1 As System.Windows.Forms.GroupBox
    Public WithEvents cboEoi As System.Windows.Forms.ComboBox
    Public WithEvents cboDelim As System.Windows.Forms.ComboBox
    Public WithEvents txtMyAddr As System.Windows.Forms.TextBox
    Public WithEvents txtDevName As System.Windows.Forms.TextBox
    Public WithEvents Label4 As System.Windows.Forms.Label
    Public WithEvents Label3 As System.Windows.Forms.Label
    Public WithEvents Label2 As System.Windows.Forms.Label
    Public WithEvents Label1 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Frame5 = New System.Windows.Forms.GroupBox()
        Me.optSrqSend = New System.Windows.Forms.RadioButton()
        Me.optSrqNotSend = New System.Windows.Forms.RadioButton()
        Me.txtSPollStb = New System.Windows.Forms.TextBox()
        Me.cmdSendSrq = New System.Windows.Forms.Button()
        Me.Label6 = New System.Windows.Forms.Label()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.cmdRetDel = New System.Windows.Forms.Button()
        Me.cmdDataDel = New System.Windows.Forms.Button()
        Me.Frame4 = New System.Windows.Forms.GroupBox()
        Me.optPPollResponseIst1 = New System.Windows.Forms.RadioButton()
        Me.cmdParallelpollSetting = New System.Windows.Forms.Button()
        Me.optPPollResponseIst0 = New System.Windows.Forms.RadioButton()
        Me.optPPollResponseSrq = New System.Windows.Forms.RadioButton()
        Me.optPPollResponseNot = New System.Windows.Forms.RadioButton()
        Me.Frame3 = New System.Windows.Forms.GroupBox()
        Me.lstRet = New System.Windows.Forms.ListBox()
        Me.Frame2 = New System.Windows.Forms.GroupBox()
        Me.cmdRec = New System.Windows.Forms.Button()
        Me.cmdSend = New System.Windows.Forms.Button()
        Me.txtRec = New System.Windows.Forms.TextBox()
        Me.txtSend = New System.Windows.Forms.TextBox()
        Me.cmdExit = New System.Windows.Forms.Button()
        Me.cmdInit = New System.Windows.Forms.Button()
        Me.Frame1 = New System.Windows.Forms.GroupBox()
        Me.cboEoi = New System.Windows.Forms.ComboBox()
        Me.cboDelim = New System.Windows.Forms.ComboBox()
        Me.txtMyAddr = New System.Windows.Forms.TextBox()
        Me.txtDevName = New System.Windows.Forms.TextBox()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.Frame5.SuspendLayout()
        Me.Frame4.SuspendLayout()
        Me.Frame3.SuspendLayout()
        Me.Frame2.SuspendLayout()
        Me.Frame1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Frame5
        '
        Me.Frame5.BackColor = System.Drawing.SystemColors.Control
        Me.Frame5.Controls.AddRange(New System.Windows.Forms.Control() {Me.optSrqSend, Me.optSrqNotSend, Me.txtSPollStb, Me.cmdSendSrq, Me.Label6, Me.Label5})
        Me.Frame5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame5.Location = New System.Drawing.Point(576, 8)
        Me.Frame5.Name = "Frame5"
        Me.Frame5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame5.Size = New System.Drawing.Size(145, 129)
        Me.Frame5.TabIndex = 30
        Me.Frame5.TabStop = False
        Me.Frame5.Text = "VA|["
        '
        'optSrqSend
        '
        Me.optSrqSend.BackColor = System.Drawing.SystemColors.Control
        Me.optSrqSend.Cursor = System.Windows.Forms.Cursors.Default
        Me.optSrqSend.ForeColor = System.Drawing.SystemColors.ControlText
        Me.optSrqSend.Location = New System.Drawing.Point(8, 40)
        Me.optSrqSend.Name = "optSrqSend"
        Me.optSrqSend.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.optSrqSend.Size = New System.Drawing.Size(113, 17)
        Me.optSrqSend.TabIndex = 27
        Me.optSrqSend.TabStop = True
        Me.optSrqSend.Text = "SRQo"
        '
        'optSrqNotSend
        '
        Me.optSrqNotSend.BackColor = System.Drawing.SystemColors.Control
        Me.optSrqNotSend.Checked = True
        Me.optSrqNotSend.Cursor = System.Windows.Forms.Cursors.Default
        Me.optSrqNotSend.ForeColor = System.Drawing.SystemColors.ControlText
        Me.optSrqNotSend.Location = New System.Drawing.Point(8, 16)
        Me.optSrqNotSend.Name = "optSrqNotSend"
        Me.optSrqNotSend.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.optSrqNotSend.Size = New System.Drawing.Size(113, 17)
        Me.optSrqNotSend.TabIndex = 26
        Me.optSrqNotSend.TabStop = True
        Me.optSrqNotSend.Text = "SRQoȂ" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10)
        '
        'txtSPollStb
        '
        Me.txtSPollStb.AcceptsReturn = True
        Me.txtSPollStb.AutoSize = False
        Me.txtSPollStb.BackColor = System.Drawing.SystemColors.Window
        Me.txtSPollStb.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtSPollStb.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtSPollStb.ImeMode = System.Windows.Forms.ImeMode.Off
        Me.txtSPollStb.Location = New System.Drawing.Point(112, 64)
        Me.txtSPollStb.MaxLength = 3
        Me.txtSPollStb.Name = "txtSPollStb"
        Me.txtSPollStb.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSPollStb.Size = New System.Drawing.Size(25, 25)
        Me.txtSPollStb.TabIndex = 24
        Me.txtSPollStb.Text = "0"
        '
        'cmdSendSrq
        '
        Me.cmdSendSrq.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSendSrq.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSendSrq.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSendSrq.Location = New System.Drawing.Point(16, 96)
        Me.cmdSendSrq.Name = "cmdSendSrq"
        Me.cmdSendSrq.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSendSrq.Size = New System.Drawing.Size(113, 25)
        Me.cmdSendSrq.TabIndex = 22
        Me.cmdSendSrq.Text = "ݒl𔽉f"
        '
        'Label6
        '
        Me.Label6.BackColor = System.Drawing.SystemColors.Control
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(16, 80)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(88, 17)
        Me.Label6.TabIndex = 25
        Me.Label6.Text = "(0`255Őݒ)"
        '
        'Label5
        '
        Me.Label5.BackColor = System.Drawing.SystemColors.Control
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label5.Location = New System.Drawing.Point(8, 64)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(97, 17)
        Me.Label5.TabIndex = 23
        Me.Label5.Text = "Xe[^XoCg ="
        '
        'cmdRetDel
        '
        Me.cmdRetDel.BackColor = System.Drawing.SystemColors.Control
        Me.cmdRetDel.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdRetDel.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdRetDel.Location = New System.Drawing.Point(144, 272)
        Me.cmdRetDel.Name = "cmdRetDel"
        Me.cmdRetDel.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdRetDel.Size = New System.Drawing.Size(113, 25)
        Me.cmdRetDel.TabIndex = 29
        Me.cmdRetDel.Text = "߂l"
        '
        'cmdDataDel
        '
        Me.cmdDataDel.BackColor = System.Drawing.SystemColors.Control
        Me.cmdDataDel.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdDataDel.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdDataDel.Location = New System.Drawing.Point(16, 272)
        Me.cmdDataDel.Name = "cmdDataDel"
        Me.cmdDataDel.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdDataDel.Size = New System.Drawing.Size(113, 25)
        Me.cmdDataDel.TabIndex = 28
        Me.cmdDataDel.Text = "f[^"
        '
        'Frame4
        '
        Me.Frame4.BackColor = System.Drawing.SystemColors.Control
        Me.Frame4.Controls.AddRange(New System.Windows.Forms.Control() {Me.optPPollResponseIst1, Me.cmdParallelpollSetting, Me.optPPollResponseIst0, Me.optPPollResponseSrq, Me.optPPollResponseNot})
        Me.Frame4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame4.Location = New System.Drawing.Point(576, 160)
        Me.Frame4.Name = "Frame4"
        Me.Frame4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame4.Size = New System.Drawing.Size(145, 161)
        Me.Frame4.TabIndex = 27
        Me.Frame4.TabStop = False
        Me.Frame4.Text = "p|["
        '
        'optPPollResponseIst1
        '
        Me.optPPollResponseIst1.BackColor = System.Drawing.SystemColors.Control
        Me.optPPollResponseIst1.Cursor = System.Windows.Forms.Cursors.Default
        Me.optPPollResponseIst1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.optPPollResponseIst1.Location = New System.Drawing.Point(8, 70)
        Me.optPPollResponseIst1.Name = "optPPollResponseIst1"
        Me.optPPollResponseIst1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.optPPollResponseIst1.Size = New System.Drawing.Size(129, 17)
        Me.optPPollResponseIst1.TabIndex = 32
        Me.optPPollResponseIst1.TabStop = True
        Me.optPPollResponseIst1.Text = "ISTbitŉ(IST=1)"
        '
        'cmdParallelpollSetting
        '
        Me.cmdParallelpollSetting.BackColor = System.Drawing.SystemColors.Control
        Me.cmdParallelpollSetting.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdParallelpollSetting.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdParallelpollSetting.Location = New System.Drawing.Point(24, 120)
        Me.cmdParallelpollSetting.Name = "cmdParallelpollSetting"
        Me.cmdParallelpollSetting.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdParallelpollSetting.Size = New System.Drawing.Size(105, 25)
        Me.cmdParallelpollSetting.TabIndex = 31
        Me.cmdParallelpollSetting.Text = "ݒl𔽉f"
        '
        'optPPollResponseIst0
        '
        Me.optPPollResponseIst0.BackColor = System.Drawing.SystemColors.Control
        Me.optPPollResponseIst0.Cursor = System.Windows.Forms.Cursors.Default
        Me.optPPollResponseIst0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.optPPollResponseIst0.Location = New System.Drawing.Point(8, 43)
        Me.optPPollResponseIst0.Name = "optPPollResponseIst0"
        Me.optPPollResponseIst0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.optPPollResponseIst0.Size = New System.Drawing.Size(129, 17)
        Me.optPPollResponseIst0.TabIndex = 18
        Me.optPPollResponseIst0.TabStop = True
        Me.optPPollResponseIst0.Text = "ISTbitŉ(IST=0)"
        '
        'optPPollResponseSrq
        '
        Me.optPPollResponseSrq.BackColor = System.Drawing.SystemColors.Control
        Me.optPPollResponseSrq.Cursor = System.Windows.Forms.Cursors.Default
        Me.optPPollResponseSrq.ForeColor = System.Drawing.SystemColors.ControlText
        Me.optPPollResponseSrq.Location = New System.Drawing.Point(8, 96)
        Me.optPPollResponseSrq.Name = "optPPollResponseSrq"
        Me.optPPollResponseSrq.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.optPPollResponseSrq.Size = New System.Drawing.Size(129, 16)
        Me.optPPollResponseSrq.TabIndex = 17
        Me.optPPollResponseSrq.TabStop = True
        Me.optPPollResponseSrq.Text = "SRQɂ킹ĉ"
        '
        'optPPollResponseNot
        '
        Me.optPPollResponseNot.BackColor = System.Drawing.SystemColors.Control
        Me.optPPollResponseNot.Checked = True
        Me.optPPollResponseNot.Cursor = System.Windows.Forms.Cursors.Default
        Me.optPPollResponseNot.ForeColor = System.Drawing.SystemColors.ControlText
        Me.optPPollResponseNot.Location = New System.Drawing.Point(8, 16)
        Me.optPPollResponseNot.Name = "optPPollResponseNot"
        Me.optPPollResponseNot.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.optPPollResponseNot.Size = New System.Drawing.Size(89, 17)
        Me.optPPollResponseNot.TabIndex = 16
        Me.optPPollResponseNot.TabStop = True
        Me.optPPollResponseNot.Text = "Ȃ"
        '
        'Frame3
        '
        Me.Frame3.BackColor = System.Drawing.SystemColors.Control
        Me.Frame3.Controls.AddRange(New System.Windows.Forms.Control() {Me.lstRet})
        Me.Frame3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame3.Location = New System.Drawing.Point(8, 184)
        Me.Frame3.Name = "Frame3"
        Me.Frame3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame3.Size = New System.Drawing.Size(545, 81)
        Me.Frame3.TabIndex = 26
        Me.Frame3.TabStop = False
        Me.Frame3.Text = "߂l"
        '
        'lstRet
        '
        Me.lstRet.BackColor = System.Drawing.SystemColors.Window
        Me.lstRet.Cursor = System.Windows.Forms.Cursors.Default
        Me.lstRet.ForeColor = System.Drawing.SystemColors.WindowText
        Me.lstRet.ItemHeight = 12
        Me.lstRet.Location = New System.Drawing.Point(8, 16)
        Me.lstRet.Name = "lstRet"
        Me.lstRet.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lstRet.Size = New System.Drawing.Size(529, 52)
        Me.lstRet.TabIndex = 28
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdRec, Me.cmdSend, Me.txtRec, Me.txtSend})
        Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame2.Location = New System.Drawing.Point(8, 96)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(545, 81)
        Me.Frame2.TabIndex = 25
        Me.Frame2.TabStop = False
        Me.Frame2.Text = "Mf[^"
        '
        'cmdRec
        '
        Me.cmdRec.BackColor = System.Drawing.SystemColors.Control
        Me.cmdRec.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdRec.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdRec.Location = New System.Drawing.Point(424, 48)
        Me.cmdRec.Name = "cmdRec"
        Me.cmdRec.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdRec.Size = New System.Drawing.Size(105, 25)
        Me.cmdRec.TabIndex = 30
        Me.cmdRec.Text = "M"
        '
        'cmdSend
        '
        Me.cmdSend.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSend.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSend.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSend.Location = New System.Drawing.Point(424, 16)
        Me.cmdSend.Name = "cmdSend"
        Me.cmdSend.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSend.Size = New System.Drawing.Size(105, 25)
        Me.cmdSend.TabIndex = 29
        Me.cmdSend.Text = "M"
        '
        'txtRec
        '
        Me.txtRec.AcceptsReturn = True
        Me.txtRec.AutoSize = False
        Me.txtRec.BackColor = System.Drawing.SystemColors.Window
        Me.txtRec.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtRec.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtRec.Location = New System.Drawing.Point(8, 48)
        Me.txtRec.MaxLength = 0
        Me.txtRec.Name = "txtRec"
        Me.txtRec.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtRec.Size = New System.Drawing.Size(393, 25)
        Me.txtRec.TabIndex = 13
        Me.txtRec.Text = ""
        '
        'txtSend
        '
        Me.txtSend.AcceptsReturn = True
        Me.txtSend.AutoSize = False
        Me.txtSend.BackColor = System.Drawing.SystemColors.Window
        Me.txtSend.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtSend.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtSend.Location = New System.Drawing.Point(8, 16)
        Me.txtSend.MaxLength = 0
        Me.txtSend.Name = "txtSend"
        Me.txtSend.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSend.Size = New System.Drawing.Size(393, 25)
        Me.txtSend.TabIndex = 12
        Me.txtSend.Text = ""
        '
        'cmdExit
        '
        Me.cmdExit.BackColor = System.Drawing.SystemColors.Control
        Me.cmdExit.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdExit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdExit.Location = New System.Drawing.Point(368, 48)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdExit.Size = New System.Drawing.Size(113, 25)
        Me.cmdExit.TabIndex = 24
        Me.cmdExit.Text = "I(&X)"
        '
        'cmdInit
        '
        Me.cmdInit.BackColor = System.Drawing.SystemColors.Control
        Me.cmdInit.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdInit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdInit.Location = New System.Drawing.Point(368, 8)
        Me.cmdInit.Name = "cmdInit"
        Me.cmdInit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdInit.Size = New System.Drawing.Size(113, 25)
        Me.cmdInit.TabIndex = 0
        Me.cmdInit.Text = "(&I)"
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me.cboEoi, Me.cboDelim, Me.txtMyAddr, Me.txtDevName, Me.Label4, Me.Label3, Me.Label2, Me.Label1})
        Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame1.Location = New System.Drawing.Point(8, 8)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(353, 81)
        Me.Frame1.TabIndex = 22
        Me.Frame1.TabStop = False
        Me.Frame1.Text = "@"
        '
        'cboEoi
        '
        Me.cboEoi.BackColor = System.Drawing.SystemColors.Window
        Me.cboEoi.Cursor = System.Windows.Forms.Cursors.Default
        Me.cboEoi.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboEoi.ForeColor = System.Drawing.SystemColors.WindowText
        Me.cboEoi.Items.AddRange(New Object() {"o͂Ȃ", "o͂"})
        Me.cboEoi.Location = New System.Drawing.Point(256, 48)
        Me.cboEoi.Name = "cboEoi"
        Me.cboEoi.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cboEoi.Size = New System.Drawing.Size(89, 20)
        Me.cboEoi.TabIndex = 8
        '
        'cboDelim
        '
        Me.cboDelim.BackColor = System.Drawing.SystemColors.Window
        Me.cboDelim.Cursor = System.Windows.Forms.Cursors.Default
        Me.cboDelim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboDelim.ForeColor = System.Drawing.SystemColors.WindowText
        Me.cboDelim.Items.AddRange(New Object() {"gpȂ", "CR+LF", "CR", "LF"})
        Me.cboDelim.Location = New System.Drawing.Point(80, 48)
        Me.cboDelim.Name = "cboDelim"
        Me.cboDelim.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cboDelim.Size = New System.Drawing.Size(73, 20)
        Me.cboDelim.TabIndex = 6
        '
        'txtMyAddr
        '
        Me.txtMyAddr.AcceptsReturn = True
        Me.txtMyAddr.AutoSize = False
        Me.txtMyAddr.BackColor = System.Drawing.SystemColors.Window
        Me.txtMyAddr.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtMyAddr.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtMyAddr.Location = New System.Drawing.Point(256, 16)
        Me.txtMyAddr.MaxLength = 0
        Me.txtMyAddr.Name = "txtMyAddr"
        Me.txtMyAddr.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtMyAddr.Size = New System.Drawing.Size(33, 25)
        Me.txtMyAddr.TabIndex = 4
        Me.txtMyAddr.Text = ""
        '
        'txtDevName
        '
        Me.txtDevName.AcceptsReturn = True
        Me.txtDevName.AutoSize = False
        Me.txtDevName.BackColor = System.Drawing.SystemColors.Window
        Me.txtDevName.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtDevName.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtDevName.Location = New System.Drawing.Point(80, 16)
        Me.txtDevName.MaxLength = 0
        Me.txtDevName.Name = "txtDevName"
        Me.txtDevName.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDevName.Size = New System.Drawing.Size(73, 25)
        Me.txtDevName.TabIndex = 2
        Me.txtDevName.Text = ""
        '
        'Label4
        '
        Me.Label4.BackColor = System.Drawing.SystemColors.Control
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label4.Location = New System.Drawing.Point(168, 48)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(57, 17)
        Me.Label4.TabIndex = 7
        Me.Label4.Text = "EOI ="
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.SystemColors.Control
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label3.Location = New System.Drawing.Point(8, 48)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(65, 17)
        Me.Label3.TabIndex = 5
        Me.Label3.Text = "f~^ ="
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.SystemColors.Control
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label2.Location = New System.Drawing.Point(168, 24)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(81, 17)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "@AhX ="
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(8, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(73, 17)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "foCX ="
        '
        'Slave
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
        Me.ClientSize = New System.Drawing.Size(728, 326)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Frame5, Me.cmdRetDel, Me.cmdDataDel, Me.Frame4, Me.Frame3, Me.Frame2, Me.cmdExit, Me.cmdInit, Me.Frame1})
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Slave"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "X[uTv"
        Me.Frame5.ResumeLayout(False)
        Me.Frame4.ResumeLayout(False)
        Me.Frame3.ResumeLayout(False)
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private mlngRet As Integer
    Private mintDevId As Short

    '**************************************************************************************************
    '   lݒ
    '**************************************************************************************************
    Private Sub Slave_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        txtDevName.Text = "GPIB000"
        txtMyAddr.Text = CStr(1)
        cboDelim.SelectedIndex = 1 'CR+LF
        cboEoi.SelectedIndex = 1 'o͂
        txtSend.Text = "CONTEC Slave Sample" 'ftHgMf[^
        txtSPollStb.Text = CStr(0)
    End Sub

    '**************************************************************************************************
    '   Iݒ(I)
    '**************************************************************************************************
    Private Sub Slave_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed
        Call cmdExit_Click(cmdExit, New System.EventArgs())
    End Sub

    '**************************************************************************************************
    '   nꂽ߂lXg{bNXɔf܂(Tu[`)
    '   ߂lF    False(), True(ُ)
    '**************************************************************************************************
    Private Function funcSetlstRet(ByRef strRet As String) As Boolean
        Dim blnRet As Boolean
        blnRet = False '߂l

        If Len(strRet) = 0 Then '`FbN
            blnRet = True
        Else
            If lstRet.Items.Count >= 256 Then 'Xg{bNX̌Eݒ
                lstRet.Items.RemoveAt(0)
                lstRet.Items.Add(strRet)
            Else
                lstRet.Items.Add(strRet)
            End If
            lstRet.SelectedIndex = lstRet.Items.Count - 1
        End If
        funcSetlstRet = blnRet
    End Function
    '**************************************************************************************************
    '   @̐ݒ(Tu[`)
    '   @\FEquipent IDEf~^EEOI̐ݒs܂
    '   ߂lF    TRUE(), FALSE(ُ)
    '**************************************************************************************************
    Private Function funcSetParam() As Boolean

        Dim Delim As Short
        Dim Eoi As Short
        Dim Eos As Short
        Dim strTmp As System.Text.StringBuilder

        'f~^R[hEOIC̐ݒ
        Delim = cboDelim.SelectedIndex
        Eoi = cboEoi.SelectedIndex
        Eos = 0
        mlngRet = GpibSetDelim(mintDevId, Delim, Eoi, Eos)

        '߂l
        If mlngRet <> 0 Then
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        Else
            '\
            strTmp = New System.Text.StringBuilder("u@̐ݒvI")
            Call funcSetlstRet(strTmp.ToString)
        End If

        funcSetParam = True

    End Function

    '**************************************************************************************************
    '   
    '   @\FfoCXfoCXID擾
    '**************************************************************************************************
    Private Sub cmdInit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdInit.Click
        Dim strTmp As System.Text.StringBuilder
        Dim lngData As Integer

        '֐s
        mlngRet = GpibInit(txtDevName.Text, mintDevId)
        '߂l
        If mlngRet <> 0 Then
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        Else
            'ɃfoCXID擾łꍇ
            strTmp = New System.Text.StringBuilder("GpibInit : foCXID = " & mintDevId)
            Call funcSetlstRet(strTmp.ToString)
            '@AhX̎擾
            mlngRet = GpibGetStatus(mintDevId, &H8S, lngData)
            If mlngRet = 0 Then txtMyAddr.Text = CStr(lngData)
            'vpeBŃX[uɐݒ肳Ă邩mF
            mlngRet = GpibGetStatus(mintDevId, &HAS, lngData)
            'X[uɐݒ肳Ă邩mF
            If (mlngRet = 0) And (lngData = 0) Then
                Call MsgBox("X[uɐݒ肳Ă܂BvpeBŃX[uɐݒ肵ĂB", MsgBoxStyle.OKOnly)
            End If
            '\
            strTmp = New System.Text.StringBuilder("uvI")
            Call funcSetlstRet(strTmp.ToString)
        End If

        GpibSendIFC(mintDevId, 1) 'IFC𑗏o
    End Sub
    '**************************************************************************************************
    '   I
    '   @\FfoCXID𖳌ɂ
    '**************************************************************************************************
    Private Sub cmdExit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdExit.Click
        Dim strTmp As System.Text.StringBuilder

        'I֐s
        mlngRet = GpibExit(mintDevId)
        '߂l
        If mlngRet <> 0 Then
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        End If
        End
    End Sub


    '**************************************************************************************************
    '   f[^̑M
    '   @\F}X^@Ƀf[^𑗐M
    '**************************************************************************************************
    Private Sub cmdSend_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSend.Click
        Dim SendLen As Integer
        Dim strTmp As System.Text.StringBuilder
        Dim SendBuf As System.Text.StringBuilder

        'Equipent IDEf~^EEOI̐ݒ
        If funcSetParam() = False Then Exit Sub
        'GfBbg{bNX瑗Mf[^擾
        SendBuf = New System.Text.StringBuilder(txtSend.Text)
        SendLen = Len(txtSend.Text)
        If SendLen = 0 Then
            strTmp = New System.Text.StringBuilder("GpibSendData : Mf[^܂")
            funcSetlstRet(strTmp.ToString)
            Exit Sub
        End If

        funcSetlstRet("GpibSendData : M...")
        'Ms
        mlngRet = GpibSendData(mintDevId, SendLen, SendBuf)
        If mlngRet <> 0 Then
            'G[̏ꍇ
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        Else
            'ɑMłꍇ
            strTmp = New System.Text.StringBuilder("GpibSendData : Mf[^ = " & SendLen)
            Call funcSetlstRet(strTmp.ToString)
            strTmp = New System.Text.StringBuilder("uf[^̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub

    '**************************************************************************************************
    '   f[^̎M
    '   @\F}X^@킩f[^M
    '**************************************************************************************************
    Private Sub cmdRec_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdRec.Click
        Dim RecLen As Integer
        Dim strTmp As System.Text.StringBuilder
        Dim RecBuf As System.Text.StringBuilder


        'Equipent IDEf~^EEOI̐ݒ
        If funcSetParam() = False Then Exit Sub

        RecBuf = New System.Text.StringBuilder("", 256)
        RecLen = 256 'Mobt@TCYw
        Call funcSetlstRet("GpibRecData : M...") 'Xgɕ\
        'Ms
        mlngRet = GpibRecData(mintDevId, RecLen, RecBuf)
        If mlngRet <> 0 Then
            'G[̏ꍇ
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString) 'Xgɕ\
        Else
            'ɎMłꍇ
            txtRec.Text = VB.Left(RecBuf.ToString, RecLen)
            strTmp = New System.Text.StringBuilder("GpibRecData : Mf[^ = " & RecLen)
            Call funcSetlstRet(strTmp.ToString) 'Xgɕ\
            strTmp = New System.Text.StringBuilder("uf[^̎MvI")
            Call funcSetlstRet(strTmp.ToString) 'Xgɕ\
        End If
    End Sub

    '**************************************************************************************************
    '   Xe[^XoCg̐ݒ
    '   @\FXe[^XoCgݒ肵SRQݒ肷
    '**************************************************************************************************
    Private Sub cmdSendSrq_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSendSrq.Click
        Dim strTmp As System.Text.StringBuilder
        Dim intSrqSend As Short

        'SRQݒl擾
        If optSrqNotSend.Checked = True Then
            intSrqSend = 0
        Else
            intSrqSend = 1
        End If
        'SRQoEXe[^XoCgݒ֐s
        mlngRet = GpibSendSRQ(mintDevId, intSrqSend, Val(txtSPollStb.Text))
        '߂l
        If mlngRet <> 0 Then
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        Else
            '\
            strTmp = New System.Text.StringBuilder("uSRQoAXe[^XoCg̐ݒvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub

    '**************************************************************************************************
    '   p|[̐ݒ
    '**************************************************************************************************
    Private Sub cmdParallelpollSetting_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdParallelpollSetting.Click

        Dim Response As Short
        Dim Ist As Short
        Dim strTmp As System.Text.StringBuilder


        If optPPollResponseNot.Checked = True Then
            'uȂv
            Response = 0
        ElseIf optPPollResponseIst0.Checked = True Then
            'uISTbitŉiIST=0jv
            Response = 1
            Ist = 0
        ElseIf optPPollResponseIst1.Checked = True Then
            'uISTbitŉiIST=1jv
            Response = 1
            Ist = 1
        ElseIf optPPollResponseSrq.Checked = True Then
            'uSRQɍ킹ĉv
            Response = 2
        End If

        'p|[ݒ֐̎s
        mlngRet = GpibSetPPollResponse(mintDevId, Response)
        If mlngRet <> 0 Then
            'G[̏ꍇ
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        Else
            strTmp = New System.Text.StringBuilder("up|[̐ݒvI")
            Call funcSetlstRet(strTmp.ToString)
        End If

        If Response = 1 Then
            ' ISTbitݒ֐̎s
            mlngRet = GpibSetIst(mintDevId, Ist)
            If mlngRet <> 0 Then
                'G[̏ꍇ
                strTmp = New System.Text.StringBuilder("", 256)
                Call GpibGetErrorString(mlngRet, strTmp)
                Call funcSetlstRet(strTmp.ToString)
            Else
                strTmp = New System.Text.StringBuilder("up|[ISTݒvI")
                Call funcSetlstRet(strTmp.ToString)
            End If
        End If

    End Sub

    '**************************************************************************************************
    '   MeLXgf[^
    '**************************************************************************************************
    Private Sub cmdDataDel_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdDataDel.Click
        txtSend.Text = ""
        txtRec.Text = ""
    End Sub

    '**************************************************************************************************
    '   ߂lf[^
    '**************************************************************************************************
    Private Sub cmdRetDel_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdRetDel.Click
        lstRet.Items.Clear()
    End Sub

    '**************************************************************************************************
    '   ͋K(̂)
    '**************************************************************************************************
    Private Sub txtSPollStb_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles txtSPollStb.KeyPress
        Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
        If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> System.Windows.Forms.Keys.Back Then
            KeyAscii = 0
        End If
        If KeyAscii = 0 Then
            eventArgs.Handled = True
        End If
    End Sub
End Class
