Option Strict Off
Option Explicit On 
Imports System.Runtime.InteropServices  'Added by Tony
Imports VB = Microsoft.VisualBasic

Public Class Master
    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 cmdExit As System.Windows.Forms.Button
    Public WithEvents Frame6 As System.Windows.Forms.GroupBox
    Public WithEvents cmdPPoll As System.Windows.Forms.Button
    Public WithEvents cmdSetPPoll As System.Windows.Forms.Button
    Public WithEvents cmdSPoll As System.Windows.Forms.Button
    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 lstRet As System.Windows.Forms.ListBox
    Public WithEvents Frame3 As System.Windows.Forms.GroupBox
    Public WithEvents txtAddr As System.Windows.Forms.TextBox
    Public WithEvents cmdSearch As System.Windows.Forms.Button
    Public WithEvents cboEoi As System.Windows.Forms.ComboBox
    Public WithEvents cboDelim As System.Windows.Forms.ComboBox
    Public WithEvents cboAddr As System.Windows.Forms.ComboBox
    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 Frame2 As System.Windows.Forms.GroupBox
    Public WithEvents txtMyAddr As System.Windows.Forms.TextBox
    Public WithEvents txtDevName As System.Windows.Forms.TextBox
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents Label1 As System.Windows.Forms.Label
    Public WithEvents Frame1 As System.Windows.Forms.GroupBox
    Public WithEvents cmdRec As System.Windows.Forms.Button
    Public WithEvents txtRec As System.Windows.Forms.TextBox
    Public WithEvents cmdSend As System.Windows.Forms.Button
    Public WithEvents txtSend As System.Windows.Forms.TextBox
    Public WithEvents cmdInit As System.Windows.Forms.Button
    Public WithEvents Frame5 As System.Windows.Forms.GroupBox
    Public WithEvents cmdLlo As System.Windows.Forms.Button
    Public WithEvents cmdGtl As System.Windows.Forms.Button
    Public WithEvents cmdDcl As System.Windows.Forms.Button
    Public WithEvents cmdSdc As System.Windows.Forms.Button
    Public WithEvents cmdGet As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cmdExit = New System.Windows.Forms.Button()
        Me.Frame6 = New System.Windows.Forms.GroupBox()
        Me.cmdPPoll = New System.Windows.Forms.Button()
        Me.cmdSetPPoll = New System.Windows.Forms.Button()
        Me.cmdSPoll = New System.Windows.Forms.Button()
        Me.cmdRetDel = New System.Windows.Forms.Button()
        Me.cmdDataDel = New System.Windows.Forms.Button()
        Me.Frame4 = New System.Windows.Forms.GroupBox()
        Me.lstRet = New System.Windows.Forms.ListBox()
        Me.Frame3 = New System.Windows.Forms.GroupBox()
        Me.txtAddr = New System.Windows.Forms.TextBox()
        Me.cmdSearch = New System.Windows.Forms.Button()
        Me.cboEoi = New System.Windows.Forms.ComboBox()
        Me.cboDelim = New System.Windows.Forms.ComboBox()
        Me.cboAddr = New System.Windows.Forms.ComboBox()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.Frame2 = New System.Windows.Forms.GroupBox()
        Me.txtMyAddr = New System.Windows.Forms.TextBox()
        Me.txtDevName = New System.Windows.Forms.TextBox()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.Frame1 = New System.Windows.Forms.GroupBox()
        Me.cmdRec = New System.Windows.Forms.Button()
        Me.txtRec = New System.Windows.Forms.TextBox()
        Me.cmdSend = New System.Windows.Forms.Button()
        Me.txtSend = New System.Windows.Forms.TextBox()
        Me.cmdInit = New System.Windows.Forms.Button()
        Me.Frame5 = New System.Windows.Forms.GroupBox()
        Me.cmdLlo = New System.Windows.Forms.Button()
        Me.cmdGtl = New System.Windows.Forms.Button()
        Me.cmdDcl = New System.Windows.Forms.Button()
        Me.cmdSdc = New System.Windows.Forms.Button()
        Me.cmdGet = New System.Windows.Forms.Button()
        Me.Frame6.SuspendLayout()
        Me.Frame4.SuspendLayout()
        Me.Frame3.SuspendLayout()
        Me.Frame2.SuspendLayout()
        Me.Frame1.SuspendLayout()
        Me.Frame5.SuspendLayout()
        Me.SuspendLayout()
        '
        '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(444, 16)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdExit.Size = New System.Drawing.Size(113, 25)
        Me.cmdExit.TabIndex = 33
        Me.cmdExit.Text = "I(&X)"
        '
        'Frame6
        '
        Me.Frame6.BackColor = System.Drawing.SystemColors.Control
        Me.Frame6.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdPPoll, Me.cmdSetPPoll, Me.cmdSPoll})
        Me.Frame6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame6.Location = New System.Drawing.Point(572, 192)
        Me.Frame6.Name = "Frame6"
        Me.Frame6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame6.Size = New System.Drawing.Size(129, 121)
        Me.Frame6.TabIndex = 32
        Me.Frame6.TabStop = False
        Me.Frame6.Text = "|[O"
        '
        'cmdPPoll
        '
        Me.cmdPPoll.BackColor = System.Drawing.SystemColors.Control
        Me.cmdPPoll.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdPPoll.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdPPoll.Location = New System.Drawing.Point(8, 88)
        Me.cmdPPoll.Name = "cmdPPoll"
        Me.cmdPPoll.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdPPoll.Size = New System.Drawing.Size(113, 25)
        Me.cmdPPoll.TabIndex = 21
        Me.cmdPPoll.Text = "p|[s"
        '
        'cmdSetPPoll
        '
        Me.cmdSetPPoll.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSetPPoll.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSetPPoll.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSetPPoll.Location = New System.Drawing.Point(8, 56)
        Me.cmdSetPPoll.Name = "cmdSetPPoll"
        Me.cmdSetPPoll.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSetPPoll.Size = New System.Drawing.Size(113, 25)
        Me.cmdSetPPoll.TabIndex = 20
        Me.cmdSetPPoll.Text = "p|[\"
        '
        'cmdSPoll
        '
        Me.cmdSPoll.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSPoll.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSPoll.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSPoll.Location = New System.Drawing.Point(8, 16)
        Me.cmdSPoll.Name = "cmdSPoll"
        Me.cmdSPoll.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSPoll.Size = New System.Drawing.Size(113, 25)
        Me.cmdSPoll.TabIndex = 19
        Me.cmdSPoll.Text = "VA|[(&P)"
        '
        '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(140, 328)
        Me.cmdRetDel.Name = "cmdRetDel"
        Me.cmdRetDel.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdRetDel.Size = New System.Drawing.Size(113, 25)
        Me.cmdRetDel.TabIndex = 30
        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(20, 328)
        Me.cmdDataDel.Name = "cmdDataDel"
        Me.cmdDataDel.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdDataDel.Size = New System.Drawing.Size(113, 25)
        Me.cmdDataDel.TabIndex = 29
        Me.cmdDataDel.Text = "f[^"
        '
        'Frame4
        '
        Me.Frame4.BackColor = System.Drawing.SystemColors.Control
        Me.Frame4.Controls.AddRange(New System.Windows.Forms.Control() {Me.lstRet})
        Me.Frame4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame4.Location = New System.Drawing.Point(4, 240)
        Me.Frame4.Name = "Frame4"
        Me.Frame4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame4.Size = New System.Drawing.Size(545, 81)
        Me.Frame4.TabIndex = 28
        Me.Frame4.TabStop = False
        Me.Frame4.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 = 33
        '
        'Frame3
        '
        Me.Frame3.BackColor = System.Drawing.SystemColors.Control
        Me.Frame3.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtAddr, Me.cmdSearch, Me.cboEoi, Me.cboDelim, Me.cboAddr, Me.Label4, Me.Label3, Me.Label2})
        Me.Frame3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame3.Location = New System.Drawing.Point(4, 64)
        Me.Frame3.Name = "Frame3"
        Me.Frame3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame3.Size = New System.Drawing.Size(545, 81)
        Me.Frame3.TabIndex = 27
        Me.Frame3.TabStop = False
        Me.Frame3.Text = "@"
        '
        'txtAddr
        '
        Me.txtAddr.AcceptsReturn = True
        Me.txtAddr.AutoSize = False
        Me.txtAddr.BackColor = System.Drawing.SystemColors.Window
        Me.txtAddr.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtAddr.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtAddr.Location = New System.Drawing.Point(88, 16)
        Me.txtAddr.MaxLength = 0
        Me.txtAddr.Name = "txtAddr"
        Me.txtAddr.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtAddr.Size = New System.Drawing.Size(81, 18)
        Me.txtAddr.TabIndex = 34
        Me.txtAddr.Text = ""
        '
        'cmdSearch
        '
        Me.cmdSearch.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSearch.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSearch.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSearch.Location = New System.Drawing.Point(424, 48)
        Me.cmdSearch.Name = "cmdSearch"
        Me.cmdSearch.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSearch.Size = New System.Drawing.Size(113, 25)
        Me.cmdSearch.TabIndex = 31
        Me.cmdSearch.Text = "@팟(&F)"
        '
        '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(288, 48)
        Me.cboEoi.Name = "cboEoi"
        Me.cboEoi.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cboEoi.Size = New System.Drawing.Size(105, 20)
        Me.cboEoi.TabIndex = 25
        '
        '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(88, 48)
        Me.cboDelim.Name = "cboDelim"
        Me.cboDelim.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cboDelim.Size = New System.Drawing.Size(105, 20)
        Me.cboDelim.TabIndex = 24
        '
        'cboAddr
        '
        Me.cboAddr.BackColor = System.Drawing.SystemColors.Window
        Me.cboAddr.Cursor = System.Windows.Forms.Cursors.Default
        Me.cboAddr.ForeColor = System.Drawing.SystemColors.WindowText
        Me.cboAddr.ImeMode = System.Windows.Forms.ImeMode.Disable
        Me.cboAddr.Location = New System.Drawing.Point(184, 16)
        Me.cboAddr.Name = "cboAddr"
        Me.cboAddr.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cboAddr.Size = New System.Drawing.Size(353, 20)
        Me.cboAddr.TabIndex = 23
        '
        '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(8, 48)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(73, 17)
        Me.Label4.TabIndex = 28
        Me.Label4.Text = "f~^ ="
        '
        '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, 16)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(81, 17)
        Me.Label3.TabIndex = 27
        Me.Label3.Text = "@AhX ="
        '
        '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(232, 48)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(33, 17)
        Me.Label2.TabIndex = 26
        Me.Label2.Text = "EOI ="
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtMyAddr, Me.txtDevName, Me.Label5, Me.Label1})
        Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame2.Location = New System.Drawing.Point(4, 8)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(313, 49)
        Me.Frame2.TabIndex = 26
        Me.Frame2.TabStop = False
        Me.Frame2.Text = "@"
        '
        '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 = 32
        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 = 256
        Me.txtDevName.Name = "txtDevName"
        Me.txtDevName.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDevName.Size = New System.Drawing.Size(73, 26)
        Me.txtDevName.TabIndex = 30
        Me.txtDevName.Text = ""
        '
        '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, 24)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(73, 17)
        Me.Label5.TabIndex = 29
        Me.Label5.Text = "foCX ="
        '
        '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(168, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(81, 17)
        Me.Label1.TabIndex = 3
        Me.Label1.Text = "@AhX ="
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdRec, Me.txtRec, Me.cmdSend, Me.txtSend})
        Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame1.Location = New System.Drawing.Point(4, 152)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(545, 81)
        Me.Frame1.TabIndex = 25
        Me.Frame1.TabStop = False
        Me.Frame1.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(113, 25)
        Me.cmdRec.TabIndex = 7
        Me.cmdRec.Text = "M(&R)"
        '
        '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 = 256
        Me.txtRec.Name = "txtRec"
        Me.txtRec.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtRec.Size = New System.Drawing.Size(409, 25)
        Me.txtRec.TabIndex = 6
        Me.txtRec.Text = ""
        '
        '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(113, 25)
        Me.cmdSend.TabIndex = 5
        Me.cmdSend.Text = "M(&S)"
        '
        '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 = 256
        Me.txtSend.Name = "txtSend"
        Me.txtSend.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSend.Size = New System.Drawing.Size(409, 25)
        Me.txtSend.TabIndex = 4
        Me.txtSend.Text = ""
        '
        '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(324, 16)
        Me.cmdInit.Name = "cmdInit"
        Me.cmdInit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdInit.Size = New System.Drawing.Size(113, 25)
        Me.cmdInit.TabIndex = 24
        Me.cmdInit.Text = "(&I)"
        '
        'Frame5
        '
        Me.Frame5.BackColor = System.Drawing.SystemColors.Control
        Me.Frame5.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdLlo, Me.cmdGtl, Me.cmdDcl, Me.cmdSdc, Me.cmdGet})
        Me.Frame5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame5.Location = New System.Drawing.Point(572, 8)
        Me.Frame5.Name = "Frame5"
        Me.Frame5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame5.Size = New System.Drawing.Size(129, 177)
        Me.Frame5.TabIndex = 31
        Me.Frame5.TabStop = False
        Me.Frame5.Text = "GPIBR}h"
        '
        'cmdLlo
        '
        Me.cmdLlo.BackColor = System.Drawing.SystemColors.Control
        Me.cmdLlo.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdLlo.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdLlo.Location = New System.Drawing.Point(8, 144)
        Me.cmdLlo.Name = "cmdLlo"
        Me.cmdLlo.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdLlo.Size = New System.Drawing.Size(113, 25)
        Me.cmdLlo.TabIndex = 17
        Me.cmdLlo.Text = "LLO(&O)"
        '
        'cmdGtl
        '
        Me.cmdGtl.BackColor = System.Drawing.SystemColors.Control
        Me.cmdGtl.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdGtl.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdGtl.Location = New System.Drawing.Point(8, 80)
        Me.cmdGtl.Name = "cmdGtl"
        Me.cmdGtl.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdGtl.Size = New System.Drawing.Size(113, 25)
        Me.cmdGtl.TabIndex = 16
        Me.cmdGtl.Text = "GTL(&T)"
        '
        'cmdDcl
        '
        Me.cmdDcl.BackColor = System.Drawing.SystemColors.Control
        Me.cmdDcl.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdDcl.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdDcl.Location = New System.Drawing.Point(8, 112)
        Me.cmdDcl.Name = "cmdDcl"
        Me.cmdDcl.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdDcl.Size = New System.Drawing.Size(113, 25)
        Me.cmdDcl.TabIndex = 15
        Me.cmdDcl.Text = "DCL(&L)"
        '
        'cmdSdc
        '
        Me.cmdSdc.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSdc.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSdc.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSdc.Location = New System.Drawing.Point(8, 48)
        Me.cmdSdc.Name = "cmdSdc"
        Me.cmdSdc.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSdc.Size = New System.Drawing.Size(113, 25)
        Me.cmdSdc.TabIndex = 14
        Me.cmdSdc.Text = "SDC(&C)"
        '
        'cmdGet
        '
        Me.cmdGet.BackColor = System.Drawing.SystemColors.Control
        Me.cmdGet.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdGet.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdGet.Location = New System.Drawing.Point(8, 16)
        Me.cmdGet.Name = "cmdGet"
        Me.cmdGet.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdGet.Size = New System.Drawing.Size(113, 25)
        Me.cmdGet.TabIndex = 13
        Me.cmdGet.Text = "GET(&G)"
        '
        'Master
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
        Me.ClientSize = New System.Drawing.Size(704, 366)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdExit, Me.Frame6, Me.cmdRetDel, Me.cmdDataDel, Me.Frame4, Me.Frame3, Me.Frame2, Me.Frame1, Me.cmdInit, Me.Frame5})
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Master"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Master"
        Me.Frame6.ResumeLayout(False)
        Me.Frame4.ResumeLayout(False)
        Me.Frame3.ResumeLayout(False)
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        Me.Frame5.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private mlngRet As Integer
    Private mintDevId As Short
    Private mintEqpId(32) As Short
    Private mintSelectEqpId As Short
    Private mintAddrArray(32) As Short

    '**************************************************************************************************
    '   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[`)
    '   @\FCNEBbvgIDEf~^EEOI̐ݒs܂
    '   ߂lF    False(), True(ُ)
    '**************************************************************************************************
    Private Function funcSetParam() As Boolean
        Dim strTmp As System.Text.StringBuilder
        Dim blnRet As Boolean
        blnRet = False '߂l


        '@킪oĂ΁AoĂ@w
        If cboAddr.Items.Count <> 0 Then
            'R{{bNXŎw肳Ă@̃CNEBbvgID擾
            mintSelectEqpId = mintEqpId(cboAddr.SelectedIndex)
        Else
            'eLXg{bNXŎw肳Ă@AhX̃CNEBbvgID擾
            mlngRet = GpibSetEquipment(mintDevId, mintSelectEqpId, Val(txtAddr.Text), 0, cboDelim.SelectedIndex)
            '߂l
            If mlngRet <> 0 Then
                strTmp = New System.Text.StringBuilder("", 256)
                Call GpibGetErrorString(mlngRet, strTmp)
                Call funcSetlstRet(strTmp.ToString)
                blnRet = True
            End If
        End If
        'f~^EEOI̐ݒ
        If blnRet = False Then
            mlngRet = GpibSetDelim(mintSelectEqpId, cboDelim.SelectedIndex, cboEoi.SelectedIndex, 0)
            '߂l
            If mlngRet <> 0 Then
                strTmp = New System.Text.StringBuilder("", 256)
                Call GpibGetErrorString(mlngRet, strTmp)
                Call funcSetlstRet(strTmp.ToString)
                blnRet = True
            Else
                '\
                strTmp = New System.Text.StringBuilder("u@̐ݒvI")
                Call funcSetlstRet(strTmp.ToString)
            End If
        End If
        funcSetParam = blnRet
    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^ɐݒ肳Ă邩mF
            mlngRet = GpibGetStatus(mintDevId, &HAS, lngData)
            '}X^ɐݒ肳Ă邩mF
            If (mlngRet = 0) And (lngData = 1) Then Call MsgBox("}X^ɐݒ肳Ă܂BvpeBŃ}X^ɐݒ肵ĂB", MsgBoxStyle.OKOnly)
            '\
            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
    '**************************************************************************************************
    '   @̌
    '   @\FfoCXIDɑ@ACNEBbvgID擾B
    '         ܂ACNEBbvgID̑@IEEE488.2ʃR}hu*IDN?v𑗐M
    '         @IDi[JAfԍj擾
    '**************************************************************************************************
    Private Sub cmdSearch_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSearch.Click
        Dim strTmp As System.Text.StringBuilder
        Dim intPrmAddr As Short
        Dim intScdAddr As Short
        Dim intArraySize As Short
        Dim i As Short
        Dim lngSendLen As Integer
        Dim strSendBuf As System.Text.StringBuilder
        Dim lngRecLen As Integer
        Dim strRecBuf As System.Text.StringBuilder
        Dim strItemText As String

        intPrmAddr = -1 'ꎟAhXSČ
        intScdAddr = 0 '񎟃AhXȂ
        intArraySize = 32 'z̃TCYw
        '@팟֐s
        mlngRet = GpibFindListener(mintDevId, intPrmAddr, intScdAddr, intArraySize, mintAddrArray)
        '߂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("GpibFindListener : o@퐔 = " & intArraySize)
            Call funcSetlstRet(strTmp.ToString)
            'Xg
            cboAddr.Items.Clear()
            For i = 0 To intArraySize - 1
                'CNEBbvgID擾֐s
                mlngRet = GpibSetEquipment(mintDevId, mintEqpId(i), mintAddrArray(i), 0, cboDelim.SelectedIndex)
                '߂l
                If mlngRet <> 0 Then
                    strTmp = New System.Text.StringBuilder("", 256)
                    Call GpibGetErrorString(mlngRet, strTmp)
                    Call funcSetlstRet(strTmp.ToString)
                Else
                    '---------------------------------------
                    '@₢킹(M)
                    '---------------------------------------
                    strSendBuf = New System.Text.StringBuilder("*IDN?")
                    lngSendLen = Len(strSendBuf.ToString)
                    mlngRet = GpibSendData(mintEqpId(i), lngSendLen, strSendBuf)
                    '߂l
                    If mlngRet <> 0 Then
                        strTmp = New System.Text.StringBuilder("", 256)
                        Call GpibGetErrorString(mlngRet, strTmp)
                        Call funcSetlstRet(strTmp.ToString)
                    Else
                        '---------------------------------------
                        '@₢킹(M)
                        '---------------------------------------
                        lngRecLen = 256
                        strRecBuf = New System.Text.StringBuilder("", 256)
                        mlngRet = GpibRecData(mintEqpId(i), lngRecLen, strRecBuf)
                        strRecBuf.Length = lngRecLen
                        '߂l
                        If mlngRet <> 0 Then
                            strTmp = New System.Text.StringBuilder("", 256)
                            Call GpibGetErrorString(mlngRet, strTmp)
                            Call funcSetlstRet(strTmp.ToString)
                        Else
                            '---------------------------------------
                            'Mf[^IEEE488.2KimF
                            '---------------------------------------
                            mlngRet = InStr(1, strRecBuf.ToString, ",", CompareMethod.Text)
                            If mlngRet > 0 Then
                                'AhX
                                strItemText = "Address: " & Val(CStr(mintAddrArray(i))) & " " & strRecBuf.ToString
                            Else
                                strItemText = "Address: " & mintAddrArray(i)
                            End If
                            'Xgɒǉ
                            cboAddr.Items.Insert(i, strItemText)
                            cboAddr.SelectedIndex = i
                        End If
                    End If
                End If
            Next i
            '\
            strTmp = New System.Text.StringBuilder("u@̌vI")
            Call funcSetlstRet(strTmp.ToString)
            If cboAddr.SelectedIndex <> -1 Then
                txtAddr.Text = CStr(Val(CStr(mintAddrArray(cboAddr.SelectedIndex))))
            End If
        End If
    End Sub
    '**************************************************************************************************
    '   f[^̑M
    '   @\FX[u@Ƀf[^𑗐M
    '**************************************************************************************************
    Private Sub cmdSend_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSend.Click
        Dim strTmp As System.Text.StringBuilder
        Dim lngSendLen As Integer
        Dim strSendBuf As System.Text.StringBuilder
        '@̐ݒ
        If funcSetParam() = True Then Exit Sub

        strSendBuf = New System.Text.StringBuilder(txtSend.Text)
        lngSendLen = Len(strSendBuf.ToString)
        If lngSendLen = 0 Then
            strTmp = New System.Text.StringBuilder("GpibSendData : Mf[^܂")
            Call funcSetlstRet(strTmp.ToString)
            Exit Sub
        End If
        strTmp = New System.Text.StringBuilder("GpibSendData : M...")
        Call funcSetlstRet(strTmp.ToString)
        'Ms
        mlngRet = GpibSendData(mintSelectEqpId, lngSendLen, strSendBuf)
        '߂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("GpibSendData : Mf[^ = " & lngSendLen)
            Call funcSetlstRet(strTmp.ToString)
            strTmp = New System.Text.StringBuilder("uf[^̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   f[^̎M
    '   @\FX[u@킩f[^M
    '**************************************************************************************************
    Private Sub cmdRec_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdRec.Click
        Dim strTmp As System.Text.StringBuilder
        Dim lngRecLen As Integer
        Dim strRecBuf As System.Text.StringBuilder
        '@̐ݒ
        If funcSetParam() = True Then Exit Sub
        strTmp = New System.Text.StringBuilder("GpibRecData : M...")
        Call funcSetlstRet(strTmp.ToString)
        lngRecLen = 256
        'Ms
        strRecBuf = New System.Text.StringBuilder("", 256)
        mlngRet = GpibRecData(mintSelectEqpId, lngRecLen, strRecBuf)
        strRecBuf.Length = lngRecLen
        '߂l
        If mlngRet <> 0 Then
            strTmp = New System.Text.StringBuilder("", 256)
            Call GpibGetErrorString(mlngRet, strTmp)
            Call funcSetlstRet(strTmp.ToString)
        Else
            '\
            strRecBuf.Length = lngRecLen
            txtRec.Text = VB.Left(strRecBuf.ToString, lngRecLen) 'Mf[^\
            strTmp = New System.Text.StringBuilder("GpibRecData : Mf[^ = " & lngRecLen)
            Call funcSetlstRet(strTmp.ToString)
            strTmp = New System.Text.StringBuilder("uf[^̎MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   GETR}h̑M
    '   @\FX[u@Ɍ߂ꂽNR}h(GET)𑗐M
    '**************************************************************************************************
    Private Sub cmdGet_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdGet.Click
        Dim strTmp As System.Text.StringBuilder
        '@̐ݒ
        If funcSetParam() = True Then Exit Sub
        'GETR}hM֐̎s
        mlngRet = GpibSendTrigger(mintSelectEqpId)
        '߂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("uGETR}h̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   SDCR}h̑M
    '   @\FX[u@ԁidjɂR}h(SDC)𑗐M
    '**************************************************************************************************
    Private Sub cmdSdc_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSdc.Click
        Dim strTmp As System.Text.StringBuilder
        '@̐ݒ
        If funcSetParam() = True Then Exit Sub
        'SDCR}hM֐̎s
        mlngRet = GpibSendDeviceClear(mintSelectEqpId)
        '߂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("uSDCR}h̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   GTLR}h̑M
    '   @\FX[u@Ƀ[J[hɖ߂R}h(GTL)𑗐M
    '**************************************************************************************************
    Private Sub cmdGtl_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdGtl.Click
        Dim strTmp As System.Text.StringBuilder
        '@̐ݒ
        If funcSetParam() = True Then Exit Sub
        'GTLR}hM֐̎s
        mlngRet = GpibChangeLocal(mintSelectEqpId)
        '߂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("uGTLR}h̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   DCLR}h̑M
    '   @\FSX[u@ԁidjɂR}h(DCL)𑗐M
    '**************************************************************************************************
    Private Sub cmdDcl_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdDcl.Click
        Dim strTmp As System.Text.StringBuilder
        'DCLR}hM֐̎s
        mlngRet = GpibSendDeviceClear(mintDevId)
        '߂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("uDCLR}h̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   LLOR}h̑M
    '   @\FSX[u@킪@̃XCb`ɂ郍[J[hւ̈ڍs֎~R}h(LLO)𑗐M
    '**************************************************************************************************
    Private Sub cmdLlo_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdLlo.Click
        Dim strTmp As System.Text.StringBuilder
        'LLOR}hM֐̎s
        mlngRet = GpibSendLocalLockout(mintDevId)
        '߂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("uLLOR}h̑MvI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   VA|[̎s
    '   @\FX[u@̃Xe[^XoCg擾
    '**************************************************************************************************
    Private Sub cmdSPoll_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSPoll.Click
        Dim strTmp As System.Text.StringBuilder
        Dim intStb As Short
        Dim intSrqLine As Short

        '@̐ݒ
        If funcSetParam() = True Then Exit Sub

        strTmp = New System.Text.StringBuilder("GpibSPoll : VA|[...")
        Call funcSetlstRet(strTmp.ToString)

        'VA|[֐̎s
        mlngRet = GpibSPoll(mintSelectEqpId, intStb, intSrqLine)
        '߂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("GpibSPoll : Xe[^XoCg = " & VB.Right("0" & Hex(intStb), 2) & "(H) SRQ C = " & VB.Right("0" & Hex(intSrqLine), 2) & "(H)")
            Call funcSetlstRet(strTmp.ToString)
            strTmp = New System.Text.StringBuilder("uVA|[̎svI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   p|[̍\
    '   @\Fp|[̃Cݒ肷
    '**************************************************************************************************
    Private Sub cmdSetPPoll_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSetPPoll.Click
        Dim strTmp As System.Text.StringBuilder
        Dim intAddrArray(9) As Short
        Dim intDataLineArray(9) As Short
        Dim intIstArray(9) As Short
        Dim i As Short

        'eLXg{bNX̋@AhXŐݒ
        i = 0
        intAddrArray(i) = Short.Parse(Me.txtAddr.Text) '@AhX
        intDataLineArray(i) = i + 1 'DIOCԍ
        intIstArray(i) = 1 '
        i = i + 1

        'z̖ݒ
        intAddrArray(i) = -1
        intDataLineArray(i) = -1
        intIstArray(i) = -1

        'p|[\֐s
        mlngRet = GpibSetPPoll(mintDevId, intAddrArray, intDataLineArray, intIstArray)
        '߂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("up|[̍\vI")
            Call funcSetlstRet(strTmp.ToString)
        End If
    End Sub
    '**************************************************************************************************
    '   p|[̎s
    '   @\Fp|[sDIOCf[^擾
    '**************************************************************************************************
    Private Sub cmdPPoll_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdPPoll.Click
        Dim strTmp As System.Text.StringBuilder
        Dim intPpr As Short
        'p|[֐s
        mlngRet = GpibPPoll(mintDevId, intPpr)
        '߂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("GpibPPoll : DIOCf[^ = " & intPpr)
            Call funcSetlstRet(strTmp.ToString)
            strTmp = New System.Text.StringBuilder("up|[̎svI")
            Call funcSetlstRet(strTmp.ToString)
        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

    '**************************************************************************************************
    '   lݒ
    '**************************************************************************************************
    Private Sub Master_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        txtMyAddr.Text = CStr(0)
        txtDevName.Text = "GPIB000"
        txtAddr.Text = CStr(1)
        cboDelim.SelectedIndex = 1 'CR+LF
        cboEoi.SelectedIndex = 1 'o͂
        txtSend.Text = "CONTEC Master Sample"
    End Sub
    '**************************************************************************************************
    '   Iݒ(I)
    '**************************************************************************************************
    Private Sub Master_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed
        Call cmdExit_Click(cmdExit, New System.EventArgs())
    End Sub
End Class
