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 Picture1 As System.Windows.Forms.PictureBox
	Public WithEvents TextRet As System.Windows.Forms.TextBox
	Public WithEvents DelData As System.Windows.Forms.Button
	Public WithEvents DelRet As System.Windows.Forms.Button
	Public WithEvents InitIalize As System.Windows.Forms.Button
	Public WithEvents ReceiveData As System.Windows.Forms.TextBox
	Public WithEvents SendData As System.Windows.Forms.TextBox
	Public WithEvents OscilloList As System.Windows.Forms.ComboBox
	Public WithEvents Ascii As System.Windows.Forms.RadioButton
	Public WithEvents Binary1 As System.Windows.Forms.RadioButton
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
	Public WithEvents YrAdrBox As System.Windows.Forms.ComboBox
	Public WithEvents Label1 As System.Windows.Forms.Label
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
    Public WithEvents Exit_Renamed As System.Windows.Forms.Button
    Public WithEvents Receive As System.Windows.Forms.Button
	Public WithEvents Send As System.Windows.Forms.Button
	Public WithEvents Label7 As System.Windows.Forms.Label
	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 Label3 As System.Windows.Forms.Label
	Public WithEvents Label2 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.Picture1 = New System.Windows.Forms.PictureBox()
        Me.TextRet = New System.Windows.Forms.TextBox()
        Me.DelData = New System.Windows.Forms.Button()
        Me.DelRet = New System.Windows.Forms.Button()
        Me.InitIalize = New System.Windows.Forms.Button()
        Me.ReceiveData = New System.Windows.Forms.TextBox()
        Me.SendData = New System.Windows.Forms.TextBox()
        Me.OscilloList = New System.Windows.Forms.ComboBox()
        Me.Frame2 = New System.Windows.Forms.GroupBox()
        Me.Ascii = New System.Windows.Forms.RadioButton()
        Me.Binary1 = New System.Windows.Forms.RadioButton()
        Me.Frame1 = New System.Windows.Forms.GroupBox()
        Me.YrAdrBox = New System.Windows.Forms.ComboBox()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.Exit_Renamed = New System.Windows.Forms.Button()
        Me.Receive = New System.Windows.Forms.Button()
        Me.Send = New System.Windows.Forms.Button()
        Me.Label7 = New System.Windows.Forms.Label()
        Me.Label6 = New System.Windows.Forms.Label()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Label2 = 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(96, 176)
        Me.DelimBox.Name = "DelimBox"
        Me.DelimBox.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.DelimBox.Size = New System.Drawing.Size(89, 23)
        Me.DelimBox.TabIndex = 23
        '
        'Picture1
        '
        Me.Picture1.BackColor = System.Drawing.SystemColors.Control
        Me.Picture1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.Picture1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Picture1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Picture1.Location = New System.Drawing.Point(72, 208)
        Me.Picture1.Name = "Picture1"
        Me.Picture1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Picture1.Size = New System.Drawing.Size(400, 200)
        Me.Picture1.TabIndex = 21
        Me.Picture1.TabStop = False
        '
        '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(94, 148)
        Me.TextRet.MaxLength = 0
        Me.TextRet.Name = "TextRet"
        Me.TextRet.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.TextRet.Size = New System.Drawing.Size(335, 24)
        Me.TextRet.TabIndex = 4
        Me.TextRet.Text = ""
        '
        'DelData
        '
        Me.DelData.BackColor = System.Drawing.SystemColors.Control
        Me.DelData.Cursor = System.Windows.Forms.Cursors.Default
        Me.DelData.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.DelData.ForeColor = System.Drawing.SystemColors.ControlText
        Me.DelData.Location = New System.Drawing.Point(299, 176)
        Me.DelData.Name = "DelData"
        Me.DelData.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.DelData.Size = New System.Drawing.Size(116, 27)
        Me.DelData.TabIndex = 11
        Me.DelData.Text = "f[^(&D)"
        '
        'DelRet
        '
        Me.DelRet.BackColor = System.Drawing.SystemColors.Control
        Me.DelRet.Cursor = System.Windows.Forms.Cursors.Default
        Me.DelRet.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.DelRet.ForeColor = System.Drawing.SystemColors.ControlText
        Me.DelRet.Location = New System.Drawing.Point(422, 176)
        Me.DelRet.Name = "DelRet"
        Me.DelRet.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.DelRet.Size = New System.Drawing.Size(115, 27)
        Me.DelRet.TabIndex = 12
        Me.DelRet.Text = "߂l(&T)"
        '
        'InitIalize
        '
        Me.InitIalize.BackColor = System.Drawing.SystemColors.Control
        Me.InitIalize.Cursor = System.Windows.Forms.Cursors.Default
        Me.InitIalize.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.InitIalize.ForeColor = System.Drawing.SystemColors.ControlText
        Me.InitIalize.Location = New System.Drawing.Point(432, 64)
        Me.InitIalize.Name = "InitIalize"
        Me.InitIalize.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.InitIalize.Size = New System.Drawing.Size(110, 25)
        Me.InitIalize.TabIndex = 0
        Me.InitIalize.Text = "(&I)"
        '
        '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(94, 120)
        Me.ReceiveData.MaxLength = 0
        Me.ReceiveData.Name = "ReceiveData"
        Me.ReceiveData.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.ReceiveData.Size = New System.Drawing.Size(335, 24)
        Me.ReceiveData.TabIndex = 7
        Me.ReceiveData.Text = ""
        '
        '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(94, 92)
        Me.SendData.MaxLength = 0
        Me.SendData.Name = "SendData"
        Me.SendData.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.SendData.Size = New System.Drawing.Size(335, 24)
        Me.SendData.TabIndex = 6
        Me.SendData.Text = ""
        '
        'OscilloList
        '
        Me.OscilloList.BackColor = System.Drawing.SystemColors.Window
        Me.OscilloList.Cursor = System.Windows.Forms.Cursors.Default
        Me.OscilloList.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.OscilloList.ForeColor = System.Drawing.SystemColors.WindowText
        Me.OscilloList.Location = New System.Drawing.Point(94, 64)
        Me.OscilloList.Name = "OscilloList"
        Me.OscilloList.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.OscilloList.Size = New System.Drawing.Size(335, 23)
        Me.OscilloList.TabIndex = 5
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me.Ascii, Me.Binary1})
        Me.Frame2.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame2.Location = New System.Drawing.Point(254, 10)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(285, 45)
        Me.Frame2.TabIndex = 16
        Me.Frame2.TabStop = False
        Me.Frame2.Text = "Mf[^^Cv"
        '
        'Ascii
        '
        Me.Ascii.BackColor = System.Drawing.SystemColors.Control
        Me.Ascii.Cursor = System.Windows.Forms.Cursors.Default
        Me.Ascii.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Ascii.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Ascii.Location = New System.Drawing.Point(180, 16)
        Me.Ascii.Name = "Ascii"
        Me.Ascii.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Ascii.Size = New System.Drawing.Size(85, 23)
        Me.Ascii.TabIndex = 3
        Me.Ascii.TabStop = True
        Me.Ascii.Text = "AXL["
        '
        'Binary1
        '
        Me.Binary1.BackColor = System.Drawing.SystemColors.Control
        Me.Binary1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Binary1.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Binary1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Binary1.Location = New System.Drawing.Point(36, 16)
        Me.Binary1.Name = "Binary1"
        Me.Binary1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Binary1.Size = New System.Drawing.Size(103, 23)
        Me.Binary1.TabIndex = 2
        Me.Binary1.TabStop = True
        Me.Binary1.Text = "oCi["
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me.YrAdrBox, Me.Label1})
        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(10, 10)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(243, 45)
        Me.Frame1.TabIndex = 14
        Me.Frame1.TabStop = False
        Me.Frame1.Text = "^[Qbg"
        '
        'YrAdrBox
        '
        Me.YrAdrBox.BackColor = System.Drawing.SystemColors.Window
        Me.YrAdrBox.Cursor = System.Windows.Forms.Cursors.Default
        Me.YrAdrBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.YrAdrBox.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.YrAdrBox.ForeColor = System.Drawing.SystemColors.WindowText
        Me.YrAdrBox.Location = New System.Drawing.Point(172, 14)
        Me.YrAdrBox.Name = "YrAdrBox"
        Me.YrAdrBox.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.YrAdrBox.Size = New System.Drawing.Size(49, 23)
        Me.YrAdrBox.TabIndex = 1
        '
        '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(22, 20)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(143, 21)
        Me.Label1.TabIndex = 15
        Me.Label1.Text = "@AhX  ="
        '
        '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(432, 148)
        Me.Exit_Renamed.Name = "Exit_Renamed"
        Me.Exit_Renamed.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Exit_Renamed.Size = New System.Drawing.Size(110, 25)
        Me.Exit_Renamed.TabIndex = 13
        Me.Exit_Renamed.Text = "I(&X)"
        '
        '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(432, 120)
        Me.Receive.Name = "Receive"
        Me.Receive.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Receive.Size = New System.Drawing.Size(110, 25)
        Me.Receive.TabIndex = 10
        Me.Receive.Text = "f[^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(432, 92)
        Me.Send.Name = "Send"
        Me.Send.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Send.Size = New System.Drawing.Size(110, 25)
        Me.Send.TabIndex = 9
        Me.Send.Text = "f[^M(&S)"
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.SystemColors.Control
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label7.Location = New System.Drawing.Point(8, 184)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(57, 17)
        Me.Label7.TabIndex = 24
        Me.Label7.Text = "f~^"
        '
        '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(476, 208)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(48, 19)
        Me.Label6.TabIndex = 22
        Me.Label6.Text = "Ot"
        '
        '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(10, 152)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(48, 15)
        Me.Label5.TabIndex = 20
        Me.Label5.Text = "߂l"
        '
        '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(10, 124)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(81, 15)
        Me.Label4.TabIndex = 19
        Me.Label4.Text = "Mf[^"
        '
        '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(10, 96)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(79, 15)
        Me.Label3.TabIndex = 18
        Me.Label3.Text = "Mf[^"
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.SystemColors.Control
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
        Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label2.Location = New System.Drawing.Point(10, 68)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(87, 15)
        Me.Label2.TabIndex = 17
        Me.Label2.Text = "IV^Cv"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
        Me.ClientSize = New System.Drawing.Size(547, 417)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.DelimBox, Me.Picture1, Me.TextRet, Me.DelData, Me.DelRet, Me.InitIalize, Me.ReceiveData, Me.SendData, Me.OscilloList, Me.Frame2, Me.Frame1, Me.Exit_Renamed, Me.Receive, Me.Send, Me.Label7, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2})
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.Location = New System.Drawing.Point(85, 130)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Form1"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
        Me.Text = "IVXR[v"
        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 SendBuf As String									'Mobt@
	Dim RecvBuf As New String("", 10000)					'Mobt@
	Dim RecvBuf2(10000) As Byte								'Mobt@̔z
	Dim Adrs As Integer										'AhX쐬Ɏgp
	Dim ErrText As String									'eLXg\p
	Dim Srlen As Integer									'̒
	Dim Delim As Integer									'f~^
	Dim gChCmd As GCHandle									'CmdzpGCHandle
	Dim gChRecvBuf2 As GCHandle								'RecvBuf2zpGCHandle
	Dim pRecvBuf2 As IntPtr									'RecvBuf2zpIntPtr

	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

		For Adrs = 0 To 30									'@AhX̍쐬
			YrAdrBox.Items.Add(CStr(Adrs))
		Next Adrs

		OscilloList.Items.Add("Tektronix 2440 OscilloScope")
		OscilloList.SelectedIndex = 0						'ݒ
		YrAddr = 2											'ݒ
		Binary1.Checked = True								'ݒ
		SendData.Text = "DATA ENCDG:RPBINARY;CURVE?"

		YrAdrBox.Text = CStr(0)								'ݒ
		DelimBox.SelectedIndex = 1							'ݒ

		'PinnednhCmdɕz
		If gChCmd.IsAllocated = False Then
			gChCmd = GCHandle.Alloc(Cmd, GCHandleType.Pinned)
		End If
		'PinnednhRecvBuf2ɕz
		If gChRecvBuf2.IsAllocated = False Then
			gChRecvBuf2 = GCHandle.Alloc(RecvBuf2, GCHandleType.Pinned)
		End If
		'PinnednhŃIuWFNg̃AhX擾
		pCmd = gChCmd.AddrOfPinnedObject()
		pRecvBuf2 = gChRecvBuf2.AddrOfPinnedObject()

	End Sub

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

		Ret = GpibInit(ErrText)
		If (Ret = 1) Then TextRet.Text = ErrText : Exit Sub

		If YrAdrBox.Items.Count = 31 Then					'}CAhXXg폜܂B
			YrAdrBox.Items.RemoveAt((MyAddr))
			If MyAddr = YrAddr Then
				YrAdrBox.SelectedIndex = 0
			End If
		End If
		TextRet.Text = ErrText

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

	End Sub

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

		TextRet.Text = "f[^𑗐MłB"
		TextRet.Refresh()

		SendBuf = SendData.Text								'Mf[^̎擾
		Srlen = Len(SendBuf)								'Mf[^̒
		If Srlen = 0 Then
			ErrText = "Mf[^܂B"
			GoTo Err_Renamed
		End If
		Cmd(0) = 2
		Cmd(1) = MyAddr
		Cmd(2) = YrAddr
		Ret = GpTalk(pCmd, Srlen, SendBuf)					'M
		If CheckRet("GpTalk", Ret, ErrText) = 1 Then GoTo Err_Renamed
		Cmd(0) = 2											'R}h
		Cmd(1) = &H3FS										'AX^UNL
		Cmd(2) = &H5FS										'Ag[N^UNT
		Ret = GpComand(pCmd)								'R}hM
		If CheckRet("GpComand", Ret, ErrText) = 1 Then GoTo Err_Renamed
		ErrText = "f[^MI܂"
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

		Dim TextBuf As String								'eLXgp
		Dim qwef As Short									'Ot`Ɏgp
		Dim qweb As Short									'Ot`Ɏgp
		Dim IfBinary As Boolean								'oCi[ŎM
		Dim st As Short										'Ot`Ɏgp
		Dim ed As Short										'Ot`Ɏgp
		Dim ch As New String("", 1)							'hCh
		Dim NumBuf As String								'Mf[^1f[^
		Dim ScaleGuideV As Short							'sN`[̕
		Dim ScaleGuideH As Short							'sN`[̍
		Dim Num(5000) As Short								'f[^𕪉
		Dim i As Integer									'FORŎgp
		Dim pen As New Drawing.Pen(System.Drawing.Color.Black, 1)

		TextRet.Text = "f[^MĂ܂B"
		TextRet.Refresh()									'ʂ̍ĕ`
		IfBinary = Binary1.Checked							'oCi[̃WI{^I

		REM ====== ReceiveData.Text = ""					'

		Srlen = 10000										'Mf[^̒
		Cmd(0) = 2											'R}h
		Cmd(1) = YrAddr										'@AhX
		Cmd(2) = MyAddr										'}CAhX
		If IfBinary = True Then								'oCi[I
			Ret = GpListenBinary(pCmd, Srlen, pRecvBuf2)	'oCi[^ŎM
		Else
			Ret = GpListen(pCmd, Srlen, RecvBuf)			'AXL[^ŎM
		End If
		If CheckRet("GpListen", Ret, ErrText) = 1 Then GoTo Err_Renamed	'M̃`FbN

		TextBuf = "f[^[ " & Srlen & " ]oCgM܂B"
		If Ret = 2 Then
			TextRet.Text = TextBuf & " And " & ErrText
		Else
			Cmd(0) = 2										'R}h
			Cmd(1) = &H3FS									'AX^UNL
			Cmd(2) = &H5FS									'Ag[N^UNT
			Ret = GpComand(pCmd)							'R}h𑗐M
			If CheckRet("GpComand", Ret, ErrText) = 1 Then GoTo Err_Renamed
			TextRet.Text = TextBuf
		End If

		If IfBinary = True Then								'oCi[I
			ReceiveData.Text = ""
		Else
			ReceiveData.Text = VB.Left(RecvBuf, Srlen)		'Mf[^̕\
		End If

		'******************************************************* [Ot`] ***
		Dim Count2 As Integer
		'Ot𐧍삷ɂ̓sN`̃vpeBScaleHeightScaleWidth
		'HeightWidth߂Kv܂B(ł1024*256ɂĂ܂B)
		Picture1.CreateGraphics.Clear(Color.LightGray)		'ʂNA܂B
		Picture1.CreateGraphics.DrawLine(pen, 0, 0, 400, 0)	'Ot̑傫łB(Scale)
		Picture1.CreateGraphics.DrawLine(pen, 0, 0, 0, 200)	'Ot̑傫łB(Scale)
		ScaleGuideV = 10									'̒
		ScaleGuideH = 20									'̒

		For Count2 = 1 To ScaleGuideV						'c܂B
			Picture1.CreateGraphics.DrawLine(pen, 0, Convert.ToInt32(200 / ScaleGuideV * Count2), 400, Convert.ToInt32(200 / ScaleGuideV * Count2))
		Next Count2
		For Count2 = 1 To ScaleGuideH						'܂B
			Picture1.CreateGraphics.DrawLine(pen, Convert.ToInt32(400 / ScaleGuideH * Count2), 0, Convert.ToInt32(400 / ScaleGuideH * Count2), 200)
		Next Count2
		pen.Width = 2
		Picture1.CreateGraphics.DrawLine(pen, 0, 100, 400, 100)
		Picture1.CreateGraphics.DrawLine(pen, 200, 0, 200, 200)

		If IfBinary = True Then								'oCi[̃f[^Ot`
			qweb = 0
			qwef = 0
			For i = 10 To Srlen
				qweb = RecvBuf2(i)
				qweb = 200 - qweb
				qwef = RecvBuf2(i + 1)
				qwef = 200 - qwef
				pen.Width = 1
				Picture1.CreateGraphics.DrawLine(pen, (i - 10), qweb, (i - 9), qwef)
			Next i
		Else

			st = 7											'擾𐔗ɕϊ܂B
			ed = 0
			Cnt = 0
			For i = 7 To Srlen

				'ch = CStr(Asc(Mid(RecvBuf, i, 1)))			'hCh܂B

				ch = RecvBuf.Substring(i, 1)

				'If CDbl(ch) = &H2CS Then					' ch = hCh
				If ch = "," Then

					ed = i
					NumBuf = Mid(RecvBuf, st, ed - st)
					Num(Cnt) = Val(NumBuf)					'oi[
					Cnt = Cnt + 1
					st = ed + 1
				End If
			Next i
			Try
				NumBuf = Mid(RecvBuf, ed, Srlen - ed)
			Catch ex As Exception When ed = 0
				NumBuf = ""
			End Try
			Num(Cnt) = Val(NumBuf)

			For i = 0 To Cnt - 1
				qweb = Num(i)
				qwef = Num(i + 1)
				pen.Width = 1
				Picture1.CreateGraphics.DrawLine(pen, i, 100 - qweb, i + 1, 100 - qwef)
			Next i
		End If

Err_Renamed:
		TextRet.Text = ErrText

	End Sub

	'///// [ M^CvAXL[ ] /////////////////////////////////////////////////////////////////
	Private Sub Ascii_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Ascii.CheckedChanged
		If eventSender.Checked Then

			SendData.Text = "DATA ENCDG:ASCII;CURVE?"

		End If
	End Sub

	'///// [ M^CvoCi[ ] ///////////////////////////////////////////////////////////////
	Private Sub Binary1_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Binary1.CheckedChanged
		If eventSender.Checked Then
			SendData.Text = "DATA ENCDG:RPBINARY;CURVE?"

		End If
	End Sub

	'///// [ Mf[^ ] ///////////////////////////////////////////////////////////////////////
	Private Sub DelData_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles DelData.Click

		ReceiveData.Text = ""

	End Sub

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

		TextRet.Text = ""

	End Sub

	'///// [ @AhX̕ύX ] ///////////////////////////////////////////////////////////////
	Private Sub YrAdrBox_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles YrAdrBox.SelectedIndexChanged

		YrAddr = CInt(YrAdrBox.Text)						'@AhX̎擾

	End Sub

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

		Ret = GpibExit()
		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
		If gChRecvBuf2.IsAllocated = True Then
			gChRecvBuf2.Free()
		End If

	End Sub
End Class