Option Strict Off
Option Explicit On 
Imports System.Runtime.InteropServices
Imports VB = Microsoft.VisualBasic
Friend Class Form1
	Inherits System.Windows.Forms.Form
#Region "Windows tH[ fUCiɂĐꂽR[h"
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'X^[gAbv tH[ɂẮAŏɍ쐬ꂽCX^XCX^XɂȂ܂B
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'̌ĂяóAWindows tH[ fUCiŕKvłB
		InitializeComponent()
	End Sub
	'Form ́AR|[lgꗗɌ㏈s邽߂ dispose I[o[Ch܂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
	Public ToolTip1 As System.Windows.Forms.ToolTip
	Public WithEvents DelimBox As System.Windows.Forms.ComboBox
	Public WithEvents MyAddress As System.Windows.Forms.TextBox
	Public WithEvents StsByte As System.Windows.Forms.ComboBox
	Public WithEvents Label6 As System.Windows.Forms.Label
	Public WithEvents Label5 As System.Windows.Forms.Label
	Public WithEvents Label4 As System.Windows.Forms.Label
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
    Public WithEvents Ret_Del As System.Windows.Forms.Button
    Public WithEvents Text_Del As System.Windows.Forms.Button
	Public WithEvents SendData As System.Windows.Forms.TextBox
	Public WithEvents ReceiveData As System.Windows.Forms.TextBox
	Public WithEvents Receive As System.Windows.Forms.Button
	Public WithEvents Send As System.Windows.Forms.Button
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
	Public WithEvents Exit_Renamed As System.Windows.Forms.Button
	Public WithEvents Init As System.Windows.Forms.Button
	Public WithEvents TextRet As System.Windows.Forms.TextBox
	Public WithEvents SRQ_ON As System.Windows.Forms.Button
	Public WithEvents Timer1 As System.Windows.Forms.Timer
	Public WithEvents SRQ_OFF As System.Windows.Forms.Button
	Public WithEvents Label1 As System.Windows.Forms.Label
	Public WithEvents Label3 As System.Windows.Forms.Label
	' : ȉ̃vV[W Windows tH[ fUCiŕKvłB
	'Windows tH[ fUCigĕύXł܂B
	'R[hGfB^gďCȂłB


	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.DelimBox = New System.Windows.Forms.ComboBox()
        Me.Frame2 = New System.Windows.Forms.GroupBox()
        Me.MyAddress = New System.Windows.Forms.TextBox()
        Me.StsByte = New System.Windows.Forms.ComboBox()
        Me.Label6 = New System.Windows.Forms.Label()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Ret_Del = New System.Windows.Forms.Button()
        Me.Text_Del = New System.Windows.Forms.Button()
        Me.Frame1 = New System.Windows.Forms.GroupBox()
        Me.SendData = New System.Windows.Forms.TextBox()
        Me.ReceiveData = New System.Windows.Forms.TextBox()
        Me.Receive = New System.Windows.Forms.Button()
        Me.Send = New System.Windows.Forms.Button()
        Me.Exit_Renamed = New System.Windows.Forms.Button()
        Me.Init = New System.Windows.Forms.Button()
        Me.TextRet = New System.Windows.Forms.TextBox()
        Me.SRQ_ON = New System.Windows.Forms.Button()
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.SRQ_OFF = New System.Windows.Forms.Button()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Frame2.SuspendLayout()
        Me.Frame1.SuspendLayout()
        Me.SuspendLayout()
        '
        'DelimBox
        '
        Me.DelimBox.BackColor = System.Drawing.SystemColors.Window
        Me.DelimBox.Cursor = System.Windows.Forms.Cursors.Default
        Me.DelimBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.DelimBox.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.DelimBox.ForeColor = System.Drawing.SystemColors.WindowText
        Me.DelimBox.Items.AddRange(New Object() {"gp", "CR+LF", "CR", "LF"})
        Me.DelimBox.Location = New System.Drawing.Point(416, 80)
        Me.DelimBox.Name = "DelimBox"
        Me.DelimBox.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.DelimBox.Size = New System.Drawing.Size(97, 23)
        Me.DelimBox.TabIndex = 20
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me.MyAddress, Me.StsByte, Me.Label6, Me.Label5, Me.Label4})
        Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame2.Location = New System.Drawing.Point(8, 2)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(397, 39)
        Me.Frame2.TabIndex = 14
        Me.Frame2.TabStop = False
        '
        'MyAddress
        '
        Me.MyAddress.AcceptsReturn = True
        Me.MyAddress.AutoSize = False
        Me.MyAddress.BackColor = System.Drawing.SystemColors.Window
        Me.MyAddress.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.MyAddress.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.MyAddress.ForeColor = System.Drawing.SystemColors.WindowText
        Me.MyAddress.Location = New System.Drawing.Point(122, 10)
        Me.MyAddress.MaxLength = 0
        Me.MyAddress.Multiline = True
        Me.MyAddress.Name = "MyAddress"
        Me.MyAddress.ReadOnly = True
        Me.MyAddress.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.MyAddress.Size = New System.Drawing.Size(25, 24)
        Me.MyAddress.TabIndex = 16
        Me.MyAddress.TabStop = False
        Me.MyAddress.Text = ""
        Me.MyAddress.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'StsByte
        '
        Me.StsByte.BackColor = System.Drawing.SystemColors.Window
        Me.StsByte.Cursor = System.Windows.Forms.Cursors.Default
        Me.StsByte.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.StsByte.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.StsByte.ForeColor = System.Drawing.SystemColors.WindowText
        Me.StsByte.Items.AddRange(New Object() {"40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"})
        Me.StsByte.Location = New System.Drawing.Point(321, 10)
        Me.StsByte.Name = "StsByte"
        Me.StsByte.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.StsByte.Size = New System.Drawing.Size(47, 23)
        Me.StsByte.TabIndex = 15
        '
        'Label6
        '
        Me.Label6.BackColor = System.Drawing.SystemColors.Control
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(12, 14)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(109, 17)
        Me.Label6.TabIndex = 19
        Me.Label6.Text = "}CAhX  "
        '
        'Label5
        '
        Me.Label5.BackColor = System.Drawing.SystemColors.Control
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label5.Location = New System.Drawing.Point(371, 15)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(14, 13)
        Me.Label5.TabIndex = 18
        Me.Label5.Text = "H"
        '
        'Label4
        '
        Me.Label4.BackColor = System.Drawing.SystemColors.Control
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label4.Location = New System.Drawing.Point(185, 14)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(135, 21)
        Me.Label4.TabIndex = 17
        Me.Label4.Text = "Xe[^XoCg "
        '
        'Ret_Del
        '
        Me.Ret_Del.BackColor = System.Drawing.SystemColors.Control
        Me.Ret_Del.Cursor = System.Windows.Forms.Cursors.Default
        Me.Ret_Del.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Ret_Del.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Ret_Del.Location = New System.Drawing.Point(174, 152)
        Me.Ret_Del.Name = "Ret_Del"
        Me.Ret_Del.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Ret_Del.Size = New System.Drawing.Size(115, 35)
        Me.Ret_Del.TabIndex = 9
        Me.Ret_Del.Text = "߂l(&B)"
        '
        'Text_Del
        '
        Me.Text_Del.BackColor = System.Drawing.SystemColors.Control
        Me.Text_Del.Cursor = System.Windows.Forms.Cursors.Default
        Me.Text_Del.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Text_Del.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Text_Del.Location = New System.Drawing.Point(294, 152)
        Me.Text_Del.Name = "Text_Del"
        Me.Text_Del.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text_Del.Size = New System.Drawing.Size(115, 35)
        Me.Text_Del.TabIndex = 10
        Me.Text_Del.Text = "f[^(&D)"
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me.SendData, Me.ReceiveData, Me.Receive, Me.Send})
        Me.Frame1.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame1.Location = New System.Drawing.Point(8, 44)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(397, 99)
        Me.Frame1.TabIndex = 12
        Me.Frame1.TabStop = False
        Me.Frame1.Text = "Mf[^"
        '
        'SendData
        '
        Me.SendData.AcceptsReturn = True
        Me.SendData.AutoSize = False
        Me.SendData.BackColor = System.Drawing.SystemColors.Window
        Me.SendData.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.SendData.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.SendData.ForeColor = System.Drawing.SystemColors.WindowText
        Me.SendData.Location = New System.Drawing.Point(12, 24)
        Me.SendData.MaxLength = 0
        Me.SendData.Name = "SendData"
        Me.SendData.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.SendData.Size = New System.Drawing.Size(283, 24)
        Me.SendData.TabIndex = 6
        Me.SendData.Text = """0123456789"" Test Data / 33 Bytes"
        '
        'ReceiveData
        '
        Me.ReceiveData.AcceptsReturn = True
        Me.ReceiveData.AutoSize = False
        Me.ReceiveData.BackColor = System.Drawing.SystemColors.Window
        Me.ReceiveData.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.ReceiveData.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.ReceiveData.ForeColor = System.Drawing.SystemColors.WindowText
        Me.ReceiveData.Location = New System.Drawing.Point(12, 58)
        Me.ReceiveData.MaxLength = 0
        Me.ReceiveData.Name = "ReceiveData"
        Me.ReceiveData.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.ReceiveData.Size = New System.Drawing.Size(283, 24)
        Me.ReceiveData.TabIndex = 8
        Me.ReceiveData.Text = ""
        '
        'Receive
        '
        Me.Receive.BackColor = System.Drawing.SystemColors.Control
        Me.Receive.Cursor = System.Windows.Forms.Cursors.Default
        Me.Receive.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Receive.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Receive.Location = New System.Drawing.Point(302, 58)
        Me.Receive.Name = "Receive"
        Me.Receive.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Receive.Size = New System.Drawing.Size(83, 27)
        Me.Receive.TabIndex = 7
        Me.Receive.Text = "M(&R)"
        '
        'Send
        '
        Me.Send.BackColor = System.Drawing.SystemColors.Control
        Me.Send.Cursor = System.Windows.Forms.Cursors.Default
        Me.Send.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Send.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Send.Location = New System.Drawing.Point(302, 22)
        Me.Send.Name = "Send"
        Me.Send.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Send.Size = New System.Drawing.Size(83, 27)
        Me.Send.TabIndex = 5
        Me.Send.Text = "M(&S)"
        '
        'Exit_Renamed
        '
        Me.Exit_Renamed.BackColor = System.Drawing.SystemColors.Control
        Me.Exit_Renamed.Cursor = System.Windows.Forms.Cursors.Default
        Me.Exit_Renamed.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Exit_Renamed.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Exit_Renamed.Location = New System.Drawing.Point(411, 192)
        Me.Exit_Renamed.Name = "Exit_Renamed"
        Me.Exit_Renamed.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Exit_Renamed.Size = New System.Drawing.Size(110, 35)
        Me.Exit_Renamed.TabIndex = 3
        Me.Exit_Renamed.Text = "I(&X)"
        '
        'Init
        '
        Me.Init.BackColor = System.Drawing.SystemColors.Control
        Me.Init.Cursor = System.Windows.Forms.Cursors.Default
        Me.Init.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Init.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Init.Location = New System.Drawing.Point(414, 8)
        Me.Init.Name = "Init"
        Me.Init.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Init.Size = New System.Drawing.Size(103, 35)
        Me.Init.TabIndex = 0
        Me.Init.Text = "(&I)"
        '
        'TextRet
        '
        Me.TextRet.AcceptsReturn = True
        Me.TextRet.AutoSize = False
        Me.TextRet.BackColor = System.Drawing.SystemColors.Window
        Me.TextRet.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextRet.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.TextRet.ForeColor = System.Drawing.SystemColors.WindowText
        Me.TextRet.Location = New System.Drawing.Point(8, 194)
        Me.TextRet.MaxLength = 0
        Me.TextRet.Name = "TextRet"
        Me.TextRet.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.TextRet.Size = New System.Drawing.Size(395, 24)
        Me.TextRet.TabIndex = 4
        Me.TextRet.Text = ""
        '
        'SRQ_ON
        '
        Me.SRQ_ON.BackColor = System.Drawing.SystemColors.Control
        Me.SRQ_ON.Cursor = System.Windows.Forms.Cursors.Default
        Me.SRQ_ON.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.SRQ_ON.ForeColor = System.Drawing.SystemColors.ControlText
        Me.SRQ_ON.Location = New System.Drawing.Point(411, 112)
        Me.SRQ_ON.Name = "SRQ_ON"
        Me.SRQ_ON.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.SRQ_ON.Size = New System.Drawing.Size(110, 35)
        Me.SRQ_ON.TabIndex = 1
        Me.SRQ_ON.Text = "rqpv(&Q)"
        '
        'Timer1
        '
        '
        'SRQ_OFF
        '
        Me.SRQ_OFF.BackColor = System.Drawing.SystemColors.Control
        Me.SRQ_OFF.Cursor = System.Windows.Forms.Cursors.Default
        Me.SRQ_OFF.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.SRQ_OFF.ForeColor = System.Drawing.SystemColors.ControlText
        Me.SRQ_OFF.Location = New System.Drawing.Point(411, 152)
        Me.SRQ_OFF.Name = "SRQ_OFF"
        Me.SRQ_OFF.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.SRQ_OFF.Size = New System.Drawing.Size(110, 35)
        Me.SRQ_OFF.TabIndex = 2
        Me.SRQ_OFF.Text = "v~(&E)"
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(416, 56)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(63, 17)
        Me.Label1.TabIndex = 21
        Me.Label1.Text = "f~^"
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.SystemColors.Control
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label3.Location = New System.Drawing.Point(9, 176)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(48, 19)
        Me.Label3.TabIndex = 11
        Me.Label3.Text = "߂l"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
        Me.ClientSize = New System.Drawing.Size(525, 229)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.DelimBox, Me.Frame2, Me.Ret_Del, Me.Text_Del, Me.Frame1, Me.Exit_Renamed, Me.Init, Me.TextRet, Me.SRQ_ON, Me.SRQ_OFF, Me.Label1, Me.Label3})
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.Location = New System.Drawing.Point(453, 295)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Form1"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
        Me.Text = "X[u[h"
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
#End Region 
#Region "AbvO[h EBU[h̃T|[g R[h"
	Private Shared m_vb6FormDefInstance As Form1
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As Form1
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New Form1()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
    Dim Mode As Integer                                     '[h̐ݒ
    Dim SendBuf As String                                   'Mobt@
    Dim RecvBuf As New String("", 10000)                    'Mobt@
    Dim ExitFlag As Boolean                                 'ESCL[mF̃tO
    Dim Stb As Integer                                      'Xe[^XoCg
    Dim ErrText As String                                   'eLXg\p
    Dim Srlen As Integer                                    '̒
    Dim Delim As Integer                                    'f~^
    Dim gChCmd As GCHandle                                  'CmdzpGCHandle

    Private Sub DelimBox_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles DelimBox.SelectedIndexChanged

        Eoi = 1                                 'Eoi = 0:gpȂ/1:gp

        Delim = DelimBox.SelectedIndex
        Ret = GpDelim(Delim, Eoi)               'f~^R[h(EOI)o̎w܂B(w肵ȂĂł)

    End Sub


    '///// [tH[[h] //////////////////////////////////////////////////////////////////////////////
    Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load

        StsByte.Text = CStr(40)                             'Xe[^XoCg̏lł
        DelimBox.Text = "CR+LF"                             'ݒ
        'PinnednhCmdɕz
        If gChCmd.IsAllocated = False Then
            gChCmd = GCHandle.Alloc(Cmd, GCHandleType.Pinned)
        End If
        'PinnednhŃIuWFNg̃AhX擾
        pCmd = gChCmd.AddrOfPinnedObject()

    End Sub

    '///// [  ] ////////////////////////////////////////////////////////////////////////////////////
    Private Sub Init_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Init.Click

        Ret = GpibInit(ErrText)                             'SubClassɂ̂̊֐܂B
        MyAddress.Text = CStr(MyAddr)                       '}CAhX̎擾
        If (Ret = 1) Then GoTo Err_Renamed
        Ret = GpBoardsts(&HAS, Mode)
        If Mode = 0 Then
            ErrText = "̋@̓X[uł͂܂ݒmFĂ"
            GoTo Err_Renamed
        End If

        Call DelimBox_SelectedIndexChanged(DelimBox, New System.EventArgs())

Err_Renamed:
        TextRet.Text = ErrText

    End Sub

    '///// [ M ] //////////////////////////////////////////////////////////////////////////////////////
    Private Sub Send_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Send.Click

        TextRet.Text = "}X^M̂҂Ă܂DDD"
        TextRet.Refresh()                                   '^XN܂ĂȂ̂ōXVłȂߤ
        SendBuf = SendData.Text                             'Mf[^obt@ɓ͂܂
        Srlen = Len(SendData.Text)                          'obt@̑傫擾܂

        If Srlen = 0 Then ErrText = "Mf[^܂" : GoTo Err_Renamed 'Mf[^O̎̏ł

        Cmd(0) = 0                                          'R}h
        Ret = GpTalk(pCmd, Srlen, SendBuf)                  'Ms܂
        If (CheckRet("GpTalk", Ret, ErrText)) = 1 Then GoTo Err_Renamed

Err_Renamed:
        TextRet.Text = ErrText

    End Sub

    '///// [ M ] //////////////////////////////////////////////////////////////////////////////////////
    Private Sub Receive_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Receive.Click

        TextRet.Text = "}X^MĂ܂DDD"
        TextRet.Refresh()                                   '^XN܂ĂȂ̂ōXVłȂߤ
        Srlen = Len(RecvBuf)                                '擾M̍őlw肵܂(Kv)
        Cmd(0) = 0                                          'R}h
        Ret = GpListen(pCmd, Srlen, RecvBuf)                'AXL[f[^̎Ms܂
        If (CheckRet("GpListen", Ret, ErrText)) = 1 Then GoTo Err_Renamed
        ReceiveData.Text = VB.Left(RecvBuf, Srlen)          'M\܂
        TextRet.Text = "[ " & Srlen & " ]oCgM܂"
        Exit Sub
Err_Renamed:
        TextRet.Text = ErrText

    End Sub

    '///// [ SRQMJn ] ///////////////////////////////////////////////////////////////////////////////
    Private Sub SRQ_ON_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles SRQ_ON.Click

        ExitFlag = False
        Ret = GpPpollmode(2)                                'p|[ɉ邩ǂ̐ݒł

        Stb = CInt("&h" & StsByte.Text)                     'Xe[^XoCg擾܂

        Ret = GpSrqEx(Stb, 1, 1)                            'EOISRQ𑗐M܂
        If CheckRet("GpSrqEx", Ret, ErrText) = 1 Then GoTo Err_Renamed
        ErrText = "SRQ𑗐MĂ܂DDD"               '|[O͂̕\܂
        Timer1.Enabled = True                               '^C}L(s)܂

Err_Renamed:
        TextRet.Text = ErrText                              'ԂĂ\܂

    End Sub

    '///// [ ^C} ] ////////////////////////////////////////////////////////////////////////////////////
    Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick

        Dim Status As Integer                               'uPD7210C`bvSRQWX^܂

        Ret = GpChkstb(Status, Eoi)                         '|[ȌIł邩`FbN܂
        If CheckRet("GpChkstb", Ret, ErrText) = 1 Then GoTo TimerEnd

        If ExitFlag = True Then                             'v~̎Ƀ^C}~܂
            TextRet.Text = "[SRQ]̑o𒆎~܂"
            GoTo TimerEnd
        End If
        '|[OɊւĕʂɏڍׂ̃wvpӂĂ܂
        If (Status And &H40S) = 0 Then                      'Status&H40}XN6rbgڂmF܂
            TextRet.Text = "}X^ɂ[SRQ]F܂"
            GoTo TimerEnd
        End If

        Exit Sub

TimerEnd:
        Timer1.Enabled = False '^C}~܂

    End Sub

    '///// [ ^C}~ ] ////////////////////////////////////////////////////////////////////////////////
    Private Sub SRQ_OFF_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles SRQ_OFF.Click

        ExitFlag = True '^C}~܂

    End Sub

    '///// [ ߂l̏ ] //////////////////////////////////////////////////////////////////////////////
    Private Sub Text_Del_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Text_Del.Click

        ReceiveData.Text = ""
        SendData.Text = ""

    End Sub

    '///// [ ߂l̃eLXg ] ////////////////////////////////////////////////////////////////////
    Private Sub Ret_Del_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Ret_Del.Click

        TextRet.Text = ""

    End Sub

    '///// [ I ] //////////////////////////////////////////////////////////////////////////////////////
    Private Sub Exit_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Exit_Renamed.Click

        Ret = GpibExit() 'SubClassɂ̊֐܂B
        Me.Close() '̃_CAȌIł

    End Sub

    Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed

        'GCHandlẻ
        If gChCmd.IsAllocated = True Then
            gChCmd.Free()
        End If
    End Sub
End Class