Option Strict Off
Option Explicit On 
Imports System.Runtime.InteropServices
Friend Class MainDlg
	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 Frame5 As System.Windows.Forms.GroupBox
	Public WithEvents Exit_Renamed As System.Windows.Forms.Button
	Public WithEvents Set_Renamed As System.Windows.Forms.Button
	Public WithEvents Label11 As System.Windows.Forms.Label
	Public WithEvents Frame4 As System.Windows.Forms.GroupBox
	Public WithEvents WfmStart As System.Windows.Forms.Button
	Public WithEvents Label9 As System.Windows.Forms.Label
	Public WithEvents Label8 As System.Windows.Forms.Label
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
	Public WithEvents AddrNo As System.Windows.Forms.ComboBox
	Public WithEvents Label1 As System.Windows.Forms.Label
	Public WithEvents Frame3 As System.Windows.Forms.GroupBox
	Public WithEvents TextSecDiv As System.Windows.Forms.TextBox
	Public WithEvents TextVolts As System.Windows.Forms.TextBox
	Public WithEvents Start As System.Windows.Forms.Button
	Public WithEvents Label4 As System.Windows.Forms.Label
	Public WithEvents Label3 As System.Windows.Forms.Label
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
	Public WithEvents Label5 As System.Windows.Forms.Label
	Public WithEvents Label10 As System.Windows.Forms.Label
	Public WithEvents Label7 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.Frame5 = New System.Windows.Forms.GroupBox()
		Me.DelimBox = New System.Windows.Forms.ComboBox()
		Me.Exit_Renamed = New System.Windows.Forms.Button()
		Me.Frame4 = New System.Windows.Forms.GroupBox()
		Me.Set_Renamed = New System.Windows.Forms.Button()
		Me.Label11 = New System.Windows.Forms.Label()
		Me.Frame2 = New System.Windows.Forms.GroupBox()
		Me.WfmStart = New System.Windows.Forms.Button()
		Me.Label9 = New System.Windows.Forms.Label()
		Me.Label8 = New System.Windows.Forms.Label()
		Me.Frame3 = New System.Windows.Forms.GroupBox()
		Me.AddrNo = New System.Windows.Forms.ComboBox()
		Me.Label1 = New System.Windows.Forms.Label()
		Me.Frame1 = New System.Windows.Forms.GroupBox()
		Me.TextSecDiv = New System.Windows.Forms.TextBox()
		Me.TextVolts = New System.Windows.Forms.TextBox()
		Me.Start = New System.Windows.Forms.Button()
		Me.Label4 = New System.Windows.Forms.Label()
		Me.Label3 = New System.Windows.Forms.Label()
		Me.Label5 = New System.Windows.Forms.Label()
		Me.Label10 = New System.Windows.Forms.Label()
		Me.Label7 = New System.Windows.Forms.Label()
		Me.Label2 = New System.Windows.Forms.Label()
		Me.Frame5.SuspendLayout()
		Me.Frame4.SuspendLayout()
		Me.Frame2.SuspendLayout()
		Me.Frame3.SuspendLayout()
		Me.Frame1.SuspendLayout()
		Me.SuspendLayout()
		'
		'Frame5
		'
		Me.Frame5.BackColor = System.Drawing.SystemColors.Control
		Me.Frame5.Controls.AddRange(New System.Windows.Forms.Control() {Me.DelimBox})
		Me.Frame5.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Frame5.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame5.Location = New System.Drawing.Point(152, 32)
		Me.Frame5.Name = "Frame5"
		Me.Frame5.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame5.Size = New System.Drawing.Size(216, 45)
		Me.Frame5.TabIndex = 21
		Me.Frame5.TabStop = False
		Me.Frame5.Text = "f~^"
		'
		'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(0, 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(16, 16)
		Me.DelimBox.Name = "DelimBox"
		Me.DelimBox.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.DelimBox.Size = New System.Drawing.Size(185, 23)
		Me.DelimBox.TabIndex = 22
		'
		'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(0, Byte))
		Me.Exit_Renamed.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Exit_Renamed.Location = New System.Drawing.Point(8, 326)
		Me.Exit_Renamed.Name = "Exit_Renamed"
		Me.Exit_Renamed.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Exit_Renamed.Size = New System.Drawing.Size(360, 31)
		Me.Exit_Renamed.TabIndex = 19
		Me.Exit_Renamed.Text = "I(&X)"
		'
		'Frame4
		'
		Me.Frame4.BackColor = System.Drawing.SystemColors.Control
		Me.Frame4.Controls.AddRange(New System.Windows.Forms.Control() {Me.Set_Renamed, Me.Label11})
		Me.Frame4.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Frame4.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame4.Location = New System.Drawing.Point(8, 266)
		Me.Frame4.Name = "Frame4"
		Me.Frame4.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame4.Size = New System.Drawing.Size(360, 53)
		Me.Frame4.TabIndex = 16
		Me.Frame4.TabStop = False
		'
		'Set_Renamed
		'
		Me.Set_Renamed.BackColor = System.Drawing.SystemColors.Control
		Me.Set_Renamed.Cursor = System.Windows.Forms.Cursors.Default
		Me.Set_Renamed.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Set_Renamed.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Set_Renamed.Location = New System.Drawing.Point(234, 14)
		Me.Set_Renamed.Name = "Set_Renamed"
		Me.Set_Renamed.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Set_Renamed.Size = New System.Drawing.Size(120, 31)
		Me.Set_Renamed.TabIndex = 18
		Me.Set_Renamed.Text = "Jn(&C)"
		'
		'Label11
		'
		Me.Label11.BackColor = System.Drawing.SystemColors.Control
		Me.Label11.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label11.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label11.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label11.Location = New System.Drawing.Point(12, 18)
		Me.Label11.Name = "Label11"
		Me.Label11.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label11.Size = New System.Drawing.Size(137, 29)
		Me.Label11.TabIndex = 17
		Me.Label11.Text = "IVXR[vɐU\܂B"
		'
		'Frame2
		'
		Me.Frame2.BackColor = System.Drawing.SystemColors.Control
		Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me.WfmStart, Me.Label9, Me.Label8})
		Me.Frame2.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame2.Location = New System.Drawing.Point(8, 180)
		Me.Frame2.Name = "Frame2"
		Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame2.Size = New System.Drawing.Size(360, 82)
		Me.Frame2.TabIndex = 11
		Me.Frame2.TabStop = False
		'
		'WfmStart
		'
		Me.WfmStart.BackColor = System.Drawing.SystemColors.Control
		Me.WfmStart.Cursor = System.Windows.Forms.Cursors.Default
		Me.WfmStart.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.WfmStart.ForeColor = System.Drawing.SystemColors.ControlText
		Me.WfmStart.Location = New System.Drawing.Point(232, 16)
		Me.WfmStart.Name = "WfmStart"
		Me.WfmStart.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.WfmStart.Size = New System.Drawing.Size(120, 31)
		Me.WfmStart.TabIndex = 13
		Me.WfmStart.Text = "f[^擾(&D)"
		'
		'Label9
		'
		Me.Label9.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(192, Byte))
		Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label9.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label9.ForeColor = System.Drawing.Color.Red
		Me.Label9.Location = New System.Drawing.Point(96, 28)
		Me.Label9.Name = "Label9"
		Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label9.Size = New System.Drawing.Size(109, 13)
		Me.Label9.TabIndex = 14
		Me.Label9.Text = "WFM_DATA.csv"
		'
		'Label8
		'
		Me.Label8.BackColor = System.Drawing.SystemColors.Control
		Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label8.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label8.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label8.Location = New System.Drawing.Point(10, 12)
		Me.Label8.Name = "Label8"
		Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label8.Size = New System.Drawing.Size(216, 60)
		Me.Label8.TabIndex = 12
		Me.Label8.Text = "g`f[^͑IhCũJg  uIIIII   v Ƃt@CŋL^܂B"
		'
		'Frame3
		'
		Me.Frame3.BackColor = System.Drawing.SystemColors.Control
		Me.Frame3.Controls.AddRange(New System.Windows.Forms.Control() {Me.AddrNo, Me.Label1})
		Me.Frame3.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Frame3.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame3.Location = New System.Drawing.Point(8, 32)
		Me.Frame3.Name = "Frame3"
		Me.Frame3.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame3.Size = New System.Drawing.Size(127, 45)
		Me.Frame3.TabIndex = 2
		Me.Frame3.TabStop = False
		Me.Frame3.Text = "@ݒ"
		'
		'AddrNo
		'
		Me.AddrNo.BackColor = System.Drawing.SystemColors.Window
		Me.AddrNo.Cursor = System.Windows.Forms.Cursors.Default
		Me.AddrNo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.AddrNo.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.AddrNo.ForeColor = System.Drawing.SystemColors.WindowText
		Me.AddrNo.Location = New System.Drawing.Point(66, 16)
		Me.AddrNo.Name = "AddrNo"
		Me.AddrNo.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.AddrNo.Size = New System.Drawing.Size(51, 23)
		Me.AddrNo.TabIndex = 3
		'
		'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(0, Byte))
		Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label1.Location = New System.Drawing.Point(10, 20)
		Me.Label1.Name = "Label1"
		Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label1.Size = New System.Drawing.Size(51, 15)
		Me.Label1.TabIndex = 4
		Me.Label1.Text = "AhX ="
		'
		'Frame1
		'
		Me.Frame1.BackColor = System.Drawing.SystemColors.Control
		Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextSecDiv, Me.TextVolts, Me.Start, Me.Label4, Me.Label3})
		Me.Frame1.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame1.Location = New System.Drawing.Point(8, 96)
		Me.Frame1.Name = "Frame1"
		Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame1.Size = New System.Drawing.Size(360, 57)
		Me.Frame1.TabIndex = 0
		Me.Frame1.TabStop = False
		'
		'TextSecDiv
		'
		Me.TextSecDiv.AcceptsReturn = True
		Me.TextSecDiv.AutoSize = False
		Me.TextSecDiv.BackColor = System.Drawing.SystemColors.Window
		Me.TextSecDiv.Cursor = System.Windows.Forms.Cursors.IBeam
		Me.TextSecDiv.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.TextSecDiv.ForeColor = System.Drawing.SystemColors.WindowText
		Me.TextSecDiv.Location = New System.Drawing.Point(116, 26)
		Me.TextSecDiv.MaxLength = 0
		Me.TextSecDiv.Name = "TextSecDiv"
		Me.TextSecDiv.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.TextSecDiv.Size = New System.Drawing.Size(97, 21)
		Me.TextSecDiv.TabIndex = 7
		Me.TextSecDiv.Text = ""
		'
		'TextVolts
		'
		Me.TextVolts.AcceptsReturn = True
		Me.TextVolts.AutoSize = False
		Me.TextVolts.BackColor = System.Drawing.SystemColors.Window
		Me.TextVolts.Cursor = System.Windows.Forms.Cursors.IBeam
		Me.TextVolts.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.TextVolts.ForeColor = System.Drawing.SystemColors.WindowText
		Me.TextVolts.Location = New System.Drawing.Point(12, 26)
		Me.TextVolts.MaxLength = 0
		Me.TextVolts.Name = "TextVolts"
		Me.TextVolts.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.TextVolts.Size = New System.Drawing.Size(97, 21)
		Me.TextVolts.TabIndex = 6
		Me.TextVolts.Text = ""
		'
		'Start
		'
		Me.Start.BackColor = System.Drawing.SystemColors.Control
		Me.Start.Cursor = System.Windows.Forms.Cursors.Default
		Me.Start.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Start.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Start.Location = New System.Drawing.Point(234, 16)
		Me.Start.Name = "Start"
		Me.Start.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Start.Size = New System.Drawing.Size(120, 31)
		Me.Start.TabIndex = 1
		Me.Start.Text = "ݒ(&A)"
		'
		'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(0, Byte))
		Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label4.Location = New System.Drawing.Point(118, 12)
		Me.Label4.Name = "Label4"
		Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label4.Size = New System.Drawing.Size(67, 15)
		Me.Label4.TabIndex = 9
		Me.Label4.Text = "SEC/DIVl"
		'
		'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(0, Byte))
		Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label3.Location = New System.Drawing.Point(14, 12)
		Me.Label3.Name = "Label3"
		Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label3.Size = New System.Drawing.Size(81, 15)
		Me.Label3.TabIndex = 8
		Me.Label3.Text = "VOLTS/DIVl"
		'
		'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", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
		Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label5.Location = New System.Drawing.Point(0, -2)
		Me.Label5.Name = "Label5"
		Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label5.Size = New System.Drawing.Size(223, 25)
		Me.Label5.TabIndex = 20
		Me.Label5.Text = "Tektronix TDS3000"
		'
		'Label10
		'
		Me.Label10.BackColor = System.Drawing.SystemColors.Control
		Me.Label10.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label10.Font = New System.Drawing.Font("lr oSVbN", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label10.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label10.Location = New System.Drawing.Point(14, 246)
		Me.Label10.Name = "Label10"
		Me.Label10.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label10.Size = New System.Drawing.Size(329, 19)
		Me.Label10.TabIndex = 15
		Me.Label10.Text = "<<< g`tH[̏Ԃ𑪒肷Tv >>>"
		'
		'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(0, Byte))
		Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label7.Location = New System.Drawing.Point(12, 166)
		Me.Label7.Name = "Label7"
		Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label7.Size = New System.Drawing.Size(239, 19)
		Me.Label7.TabIndex = 10
		Me.Label7.Text = "<<< g`f[^擾Tv >>>"
		'
		'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(0, Byte))
		Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label2.Location = New System.Drawing.Point(12, 82)
		Me.Label2.Name = "Label2"
		Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label2.Size = New System.Drawing.Size(207, 19)
		Me.Label2.TabIndex = 5
		Me.Label2.Text = "<<< XP[ݒTv >>>"
		'
		'MainDlg
		'
		Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
		Me.ClientSize = New System.Drawing.Size(378, 365)
		Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Frame5, Me.Exit_Renamed, Me.Frame4, Me.Frame2, Me.Frame3, Me.Frame1, Me.Label5, Me.Label10, Me.Label7, Me.Label2})
		Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
		Me.Location = New System.Drawing.Point(449, 214)
		Me.MaximizeBox = False
		Me.MinimizeBox = False
		Me.Name = "MainDlg"
		Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
		Me.Text = "TDS3000V[YTv"
		Me.Frame5.ResumeLayout(False)
		Me.Frame4.ResumeLayout(False)
		Me.Frame2.ResumeLayout(False)
		Me.Frame3.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 MainDlg
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As MainDlg
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New MainDlg()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
	
	' O[oϐ ///////////////////////////////////////////////////////////////////
	Dim i As Short											'Tempϐ
	Dim Ret, Ret2 As Integer								'߂l1,2
	Dim MyAddr As Integer									'}CAhX(GPIB{[hAhX)
	Dim Fstb(32) As Integer									'̒ɌfoCXƃfoCXAhX܂B
	Dim MsgText, ErrText As String							'̃bZ[WłBG[̃bZ[WłB
	Dim Delim As Integer									'f~^
	Dim gChCmd As GCHandle									'CmdzpGCHandle
	Dim gChFstb As GCHandle									'FstbzpGCHandle
	Dim pFstb As IntPtr										'FstbzpIntPtr
	
	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


	'// ̃TvłGpibPrint֐,GpibInput֐ƂN88BASIC̃Tu[`gpĂ܂B
	'// ڍׂ [ SubFunc.bas ] QƂĂB
	'// TDS3000SeriesɓYtĂNIp̃TvCONTECpɍ쐬̂łB

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

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

		Ret = GpibInit(MsgText)								'GPIB̏܂B
		If (Ret = 1) Then									'Retl0ȊOł΃G[
			Ret2 = MsgBox(MsgText, MsgBoxStyle.OKOnly, "G[")
			Exit Sub
		End If
		'***** f~^̐ݒ肪ĂȂƃf[^𐳂Mł܂B*****
		'***** GpDelim(X, Y) X -> 0:Non,1:CR/LF,2:CR,3:LF Y -> 0:Non,1:Use *****
		Ret = GpDelim(3, 1) '@̃f~^ɍ킹܂B

		Ret = GpDevFind(pFstb)								'ڑĂ@{
		Ret = GpBoardsts(&H8S, MyAddr)						'}CAhX擾

		For i = 0 To 30										'Xg{bNX0`30ǉ
			If (MyAddr <> Fstb(0)) Then						'}CAhX폜
				AddrNo.Items.Add(CStr(i))
			End If
		Next
		If Fstb(0) = 255 Then
			AddrNo.SelectedIndex = 0
		Else
			AddrNo.SelectedIndex = Fstb(0)					'@̐ݒ
		End If

		Fstb(0) = AddrNo.SelectedIndex

		DelimBox.Text = "CR+LF"								'f~^̐ݒ

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

	End Sub

	'///// [ XP[ݒvO ] //////////////////////////////////////////////////////////
	Private Sub Start_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Start.Click
		Dim ReadVolts As String								'd̕ϐ
		Dim ReadHoriz As String								'XP[̕ϐ

		If AddrNo.SelectedIndex <> Fstb(0) Then Fstb(0) = AddrNo.SelectedIndex

		Ret = GpibPrint(Fstb(0), "CLEARMENU")				'eNg̃j[NA܂B
		If (Ret = 1) Then Exit Sub
		Ret = GpibPrint(Fstb(0), "FACTORY")					'Ho׏Ԃɂ܂B
		If (Ret = 1) Then Exit Sub
		Ret = GpibPrint(Fstb(0), "LOCK ALL")				'pl̑֎~܂B
		If (Ret = 1) Then
			Exit Sub
		Else
			Ret = MsgBox("`lP̃v[uɐڑĂM␮܂B", MsgBoxStyle.OKOnly)
			Call WaitOPC(Fstb(0))							'Ƃ`FbN
		End If

		Ret = GpibPrint(Fstb(0), "HEADER 0")				'wb_tȂݒɂ܂B
		If (Ret = 1) Then Exit Sub

		Ret = GpibPrint(Fstb(0), "AUTOSET EXECUTE")			'ݒ̎s܂B
		If (Ret = 1) Then Exit Sub
		Ret = MsgBox("`lP WaveForm ݒ肵܂B", MsgBoxStyle.OKOnly, "TDS3000 -> s")

		Ret = GpibPrint(Fstb(0), "CH1:SCALE?")				'`lP̃XP[mF܂B
		If (Ret = 1) Then Exit Sub
		ReadVolts = Space(128)								'Xy[XŖ߂܂B
		Ret = GpibInput(Fstb(0), ReadVolts)					'ϐReadVoltsɎ荞݂܂B
		If (Ret = 1) Then Exit Sub
		Ret = GpibPrint(Fstb(0), "HORIZONTAL:MAIN:SCALE?")	'{ƂȂ鎞Ԏ̋敪XP[mF܂B
		If (Ret = 1) Then Exit Sub
		ReadHoriz = Space(128)								'Xy[XŖ߂܂B
		Ret = GpibInput(Fstb(0), ReadHoriz)					'ϐReadHorizɎ荞݂܂B
		If (Ret = 1) Then Exit Sub

		TextVolts.Text = ReadVolts							'd\܂B
		TextSecDiv.Text = ReadHoriz							'̃XP[\܂B

		Ret = GpibPrint(Fstb(0), "UNLOCK ALL")				'bN܂B
		If (Ret = 1) Then Exit Sub

	End Sub

	'///// [ g`f[^̉,c擾 ] /////////////////////////////////////////////////////////
	Private Sub WfmStart_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles WfmStart.Click
		Dim ByteData(1000) As Byte							'IV̎MoCg
		Dim gChByteData As GCHandle							'ByteDatazpGCHandle
		Dim pByteData As IntPtr								'ByteDatazpIntPtr
		Dim IntData(1000) As Short
		Dim DATSRC As String								'`l
		Dim StrData As String								'M
		Dim DataMax As Short								'őf[^
		Dim RD As String									'[hf[^
		Dim DSTART As Short									'f[^̍ŏ̒l
		Dim DSTOP As Short									'f[^̍Ō̒l
		Dim WFPOINTS As Short								'f[^̒
		Dim RLPREAM As String
		Dim IARRDIM As Short
		Dim CURBYTES As Short
		Dim YOFF As Single									'ItZbg(y)
		Dim YMULT As Single									'{(y)
		Dim YUNIT As String									'P(y)
		Dim PtOff As Single
		Dim XINCR As Single									'Ԏ
		Dim XUNIT As String
		Dim WAVEFL As String								'Z[u

		'PinnednhByteDataɕz
		If gChByteData.IsAllocated = False Then
			gChByteData = GCHandle.Alloc(ByteData, GCHandleType.Pinned)
		End If
		'PinnednhŃIuWFNg̃AhX擾
		pByteData = gChByteData.AddrOfPinnedObject()

		' Ret = GpibInit(ErrText)							'{[h̏
		Ret = GpibPrint(1, "HEADER OFF") 'Mf[^Ƀwb_tȂ悤ɂ܂B
		If (Ret = 1) Then Exit Sub

		DATSRC = "CH1"
		StrData = "DATA:SOURCE " & DATSRC
		Ret = GpibPrint(Fstb(0), StrData)					'CH1gp܂B
		If (Ret = 1) Then Exit Sub
		Ret = GpibPrint(Fstb(0), "DATA:ENCDG RIBINARY;WIDTH 1") 'f[^-128`127AoCi
		If (Ret = 1) Then Exit Sub
		DataMax = 500

		StrData = "HORIZONTAL:RECORDLENGTH " & Str(DataMax)
		Ret = GpibPrint(Fstb(0), StrData)					'f[^500ɂ܂B
		If (Ret = 1) Then Exit Sub

		DSTART = 1 : DSTOP = DataMax
		WFPOINTS = DSTOP - DSTART + 1

		StrData = "DATA:START " & Str(DSTART)
		Ret = GpibPrint(Fstb(0), StrData)					'X^[g1|Cg
		If (Ret = 1) Then Exit Sub

		StrData = "DATA:STOP " & Str(DSTOP)
		Ret = GpibPrint(Fstb(0), StrData)					'I500|Cg
		If (Ret = 1) Then Exit Sub

		StrData = "HEADER OFF"
		Ret = GpibPrint(Fstb(0), StrData)
		If (Ret = 1) Then Exit Sub

		Ret = GpibPrint(Fstb(0), "ACQUIRE:STATE RUN")		'g` f[^̊ln߂ƓɁAlJEgԍ0ɃZbg܂B
		If (Ret = 1) Then
			Exit Sub
		Else
			Call WaitOPC(Fstb(0))							'Ƃ`FbN
		End If
		Ret = GpibPrint(Fstb(0), "CURVE?")					'g`̃f[^TDS3000Ŏ擾܂B
		If (Ret = 1) Then Exit Sub
		RLPREAM = Space(Len(Str(WFPOINTS)) + 1)
		IARRDIM = Int(WFPOINTS / 2) + 1						'f[^2̐f[^Ƃ܂B
		CURBYTES = WFPOINTS + 1								'f[^̏
		Dim IARR(IARRDIM) As Object							'zɃZbgĂ܂B
		Ret = GpibListenB(Fstb(0), pByteData, Srlen)
		If (Ret = 1) Then Exit Sub

		For i = 0 To Srlen
			IntData(i) = ByteData(i)
			If IntData(i) > 128 Then IntData(i) = -(256 - IntData(i))
		Next

		StrData = "WFMPRE:" & DATSRC & ":YOFF?"
		Ret = GpibPrint(1, StrData)							'̎擾
		If (Ret = 1) Then Exit Sub
		RD = Space(20)
		Ret = GpibInput(1, RD)								'RDɊi[
		If (Ret = 1) Then Exit Sub
		YOFF = Val(RD)

		StrData = "WFMPRE:" & DATSRC & ":YMULT?"			'y̑
		Ret = GpibPrint(1, StrData)
		If (Ret = 1) Then Exit Sub
		RD = Space(20)
		Ret = GpibInput(1, RD)
		If (Ret = 1) Then Exit Sub
		YMULT = Val(RD)

		StrData = "WFMPRE:" & DATSRC & ":YUNIT?"			'y̒P
		Ret = GpibPrint(1, StrData)
		If (Ret = 1) Then Exit Sub
		YUNIT = Space(20)
		Ret = GpibInput(1, YUNIT)
		If (Ret = 1) Then Exit Sub

		StrData = "WFMPRE:" & DATSRC & ":PT_Off?"

		Ret = GpibPrint(1, StrData)
		If (Ret = 1) Then Exit Sub
		RD = Space(20)
		Ret = GpibInput(1, RD)
		If (Ret = 1) Then Exit Sub
		PtOff = Val(RD)

		StrData = "WFMPRE:" & DATSRC & ":XINCR?"			'l
		Ret = GpibPrint(1, StrData)
		If (Ret = 1) Then Exit Sub
		RD = Space(20)
		Ret = GpibInput(1, RD)
		If (Ret = 1) Then Exit Sub
		XINCR = Val(RD)

		StrData = "WFMPRE:" & DATSRC & ":XUNIT?"			'PʂM
		Ret = GpibPrint(1, StrData)
		If (Ret = 1) Then Exit Sub
		XUNIT = Space(20)
		Ret = GpibInput(1, XUNIT)
		If (Ret = 1) Then Exit Sub

		WAVEFL = ".\WFM_DATA.CSV"							'Z[uf[^
		FileOpen(1, WAVEFL, OpenMode.Output)				'f[^ł܂B
		Print(1, XUNIT)
		Print(1, YUNIT)
		PrintLine(1, "CH1")

		Dim VOLTARR(WFPOINTS) As Object						'dzɏo͂܂B
		Dim TIMEARR(WFPOINTS) As Object						'Ԃzɏo͂܂B
		For i = 0 To WFPOINTS - 1
			TIMEARR(i) = (i - PtOff) * XINCR
			VOLTARR(i) = (IntData(i) - YOFF) * YMULT
			PrintLine(1, TIMEARR(i), ",", VOLTARR(i))
		Next i

		MsgBox("t@C " & WAVEFL & "  ŕۑ܂B")
		FileClose()											't@C܂B

		'GCHandlẻ
		If gChByteData.IsAllocated = True Then
			gChByteData.Free()
		End If

	End Sub

	'///// [ c𑪒 ] //////////////////////////////////////////////////////////////////////
	Private Sub Set_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Set_Renamed.Click
		Dim MEASSRC, WRT, MEASTYPE As String

		Ret = MsgBox(" CH1ɍޗƂMv[uɐڑĉB", MsgBoxStyle.OKOnly + MsgBoxStyle.Information, "v[u̐ڑmF")

		Ret = GpibPrint(Fstb(0), "HEADER OFF")				'擾f[^Ƀwb_tȂݒɂ܂B
		If (Ret = 1) Then Exit Sub

		WRT = ":CH1:VOLTS 2E-1;POSITION 0;OFFSET 0;COUPLING AC"	'ʂ̉ݒ肵܂B
		Ret = GpibPrint(Fstb(0), WRT)
		If (Ret = 1) Then Exit Sub
		WRT = ":CH1:IMPEDANCE MEG;BANDWIDTH FULL"
		Ret = GpibPrint(Fstb(0), WRT)
		If (Ret = 1) Then Exit Sub
		WRT = ":HORIZONTAL:MAIN:SCALE 2E-2"
		Ret = GpibPrint(Fstb(0), WRT)
		If (Ret = 1) Then Exit Sub
		WRT = ":SELECT:CH1 1"
		Ret = GpibPrint(Fstb(0), WRT)
		If (Ret = 1) Then Exit Sub
		'CH1ɑ肵@ZbgĉB
		'܂Aʂ̔g`ƑlZbg܂B
		MEASSRC = "CH1" : MEASTYPE = "AMPLITUDE"
		WRT = ":MEASUREMENT:MEAS1:SOURCE1 " & MEASSRC & ";TYPE " & MEASTYPE & ";STATE 1"
		Ret = GpibPrint(Fstb(0), WRT)
		If (Ret = 1) Then
			Exit Sub
		Else
			Call WaitOPC(Fstb(0))							'Ƃ`FbN
		End If

		Ret = MsgBox("XR[vCH1̐U\悤ɐݒ肵܂B", MsgBoxStyle.OKOnly + MsgBoxStyle.Information, "ʒm")

		Ret = GpibPrint(Fstb(0), "UNLOCK ALL")
		If (Ret = 1) Then Exit Sub

	End Sub

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

		Ret = GpibExit()									'GPIB̏I
		End													'I

	End Sub

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

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

	End Sub
End Class