﻿' 通常版カウンタ用サンプル
Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Imports System.Text
Friend Class Counter
	Inherits System.Windows.Forms.Form
#Region "Windows フォーム デザイナによって生成されたコード"
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'スタートアップ フォームについては、最初に作成されたインスタンスが既定インスタンスになります。
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'この呼び出しは、Windows フォーム デザイナで必要です。
		InitializeComponent()
	End Sub
	'Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
	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 フォーム デザイナで必要です。
	Private components As System.ComponentModel.IContainer
	Public ToolTip1 As System.Windows.Forms.ToolTip
    Public WithEvents CntTimer As System.Windows.Forms.Timer
    Public WithEvents Edit_ReturnCode As System.Windows.Forms.TextBox
	Public WithEvents Edit_CompResult As System.Windows.Forms.TextBox
	Public WithEvents Button_CntExit As System.Windows.Forms.Button
	Public WithEvents Button_Exit As System.Windows.Forms.Button
	Public WithEvents Button_CntPreset As System.Windows.Forms.Button
	Public WithEvents Button_CntStop As System.Windows.Forms.Button
	Public WithEvents Button_CntStart As System.Windows.Forms.Button
	Public WithEvents Button_CntCompare As System.Windows.Forms.Button
	Public WithEvents Button_CntMode As System.Windows.Forms.Button
	Public WithEvents _Edit_Preset_7 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_6 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_5 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_4 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_3 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_2 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_1 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Preset_0 As System.Windows.Forms.TextBox
	Public WithEvents _Radio_Preset_1 As System.Windows.Forms.RadioButton
    Public WithEvents Frame3 As System.Windows.Forms.GroupBox
    Public WithEvents _Edit_Status_7 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_6 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_5 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_4 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_3 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_2 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_1 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Status_0 As System.Windows.Forms.TextBox
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
	Public WithEvents _Edit_Ch_7 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_6 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_5 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_4 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_3 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_2 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_1 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Ch_0 As System.Windows.Forms.TextBox
	Public WithEvents _Radio_Ch_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Radio_Ch_0 As System.Windows.Forms.RadioButton
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
	Public WithEvents Button_CntInit As System.Windows.Forms.Button
	Public WithEvents Edit_DeviceName As System.Windows.Forms.TextBox
	Public WithEvents Label12 As System.Windows.Forms.Label
	Public WithEvents Label11 As System.Windows.Forms.Label
	Public WithEvents Label10 As System.Windows.Forms.Label
	Public WithEvents Label9 As System.Windows.Forms.Label
	Public WithEvents Label8 As System.Windows.Forms.Label
	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
    Public WithEvents Label1 As System.Windows.Forms.Label
    'メモ : 以下のプロシージャは Windows フォーム デザイナで必要です。
    'Windows フォーム デザイナを使って変更できます。
	'コードエディタを使って修正しないでください。
    Public WithEvents _Radio_Preset_0 As System.Windows.Forms.RadioButton


	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.CntTimer = New System.Windows.Forms.Timer(Me.components)
        Me.Edit_ReturnCode = New System.Windows.Forms.TextBox()
        Me.Edit_CompResult = New System.Windows.Forms.TextBox()
        Me.Button_CntExit = New System.Windows.Forms.Button()
        Me.Button_Exit = New System.Windows.Forms.Button()
        Me.Button_CntPreset = New System.Windows.Forms.Button()
        Me.Button_CntStop = New System.Windows.Forms.Button()
        Me.Button_CntStart = New System.Windows.Forms.Button()
        Me.Button_CntCompare = New System.Windows.Forms.Button()
        Me.Button_CntMode = New System.Windows.Forms.Button()
        Me.Frame3 = New System.Windows.Forms.GroupBox()
        Me._Edit_Preset_7 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_6 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_5 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_4 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_3 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_2 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_1 = New System.Windows.Forms.TextBox()
        Me._Edit_Preset_0 = New System.Windows.Forms.TextBox()
        Me._Radio_Preset_1 = New System.Windows.Forms.RadioButton()
        Me._Radio_Preset_0 = New System.Windows.Forms.RadioButton()
        Me.Frame2 = New System.Windows.Forms.GroupBox()
        Me._Edit_Status_7 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_6 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_5 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_4 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_3 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_2 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_1 = New System.Windows.Forms.TextBox()
        Me._Edit_Status_0 = New System.Windows.Forms.TextBox()
        Me.Frame1 = New System.Windows.Forms.GroupBox()
        Me._Edit_Ch_7 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_6 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_5 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_4 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_3 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_2 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_1 = New System.Windows.Forms.TextBox()
        Me._Edit_Ch_0 = New System.Windows.Forms.TextBox()
        Me._Radio_Ch_1 = New System.Windows.Forms.RadioButton()
        Me._Radio_Ch_0 = New System.Windows.Forms.RadioButton()
        Me.Button_CntInit = New System.Windows.Forms.Button()
        Me.Edit_DeviceName = New System.Windows.Forms.TextBox()
        Me.Label12 = New System.Windows.Forms.Label()
        Me.Label11 = New System.Windows.Forms.Label()
        Me.Label10 = New System.Windows.Forms.Label()
        Me.Label9 = New System.Windows.Forms.Label()
        Me.Label8 = New System.Windows.Forms.Label()
        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.Label1 = New System.Windows.Forms.Label()
        Me.Frame3.SuspendLayout()
        Me.Frame2.SuspendLayout()
        Me.Frame1.SuspendLayout()
        Me.SuspendLayout()
        '
        'CntTimer
        '
        '
        'Edit_ReturnCode
        '
        Me.Edit_ReturnCode.AcceptsReturn = True
        Me.Edit_ReturnCode.AutoSize = False
        Me.Edit_ReturnCode.BackColor = System.Drawing.SystemColors.Window
        Me.Edit_ReturnCode.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Edit_ReturnCode.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Edit_ReturnCode.Location = New System.Drawing.Point(72, 352)
        Me.Edit_ReturnCode.MaxLength = 0
        Me.Edit_ReturnCode.Name = "Edit_ReturnCode"
        Me.Edit_ReturnCode.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Edit_ReturnCode.Size = New System.Drawing.Size(321, 18)
        Me.Edit_ReturnCode.TabIndex = 42
        Me.Edit_ReturnCode.Text = "Text2"
        '
        'Edit_CompResult
        '
        Me.Edit_CompResult.AcceptsReturn = True
        Me.Edit_CompResult.AutoSize = False
        Me.Edit_CompResult.BackColor = System.Drawing.SystemColors.Window
        Me.Edit_CompResult.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Edit_CompResult.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Edit_CompResult.Location = New System.Drawing.Point(72, 320)
        Me.Edit_CompResult.MaxLength = 0
        Me.Edit_CompResult.Name = "Edit_CompResult"
        Me.Edit_CompResult.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Edit_CompResult.Size = New System.Drawing.Size(321, 18)
        Me.Edit_CompResult.TabIndex = 41
        Me.Edit_CompResult.Text = "Text1"
        '
        'Button_CntExit
        '
        Me.Button_CntExit.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntExit.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntExit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntExit.Location = New System.Drawing.Point(408, 272)
        Me.Button_CntExit.Name = "Button_CntExit"
        Me.Button_CntExit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntExit.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntExit.TabIndex = 12
        Me.Button_CntExit.Text = "CntExit"
        '
        'Button_Exit
        '
        Me.Button_Exit.BackColor = System.Drawing.SystemColors.Control
        Me.Button_Exit.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_Exit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_Exit.Location = New System.Drawing.Point(408, 320)
        Me.Button_Exit.Name = "Button_Exit"
        Me.Button_Exit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_Exit.Size = New System.Drawing.Size(97, 20)
        Me.Button_Exit.TabIndex = 11
        Me.Button_Exit.Text = "Exit"
        '
        'Button_CntPreset
        '
        Me.Button_CntPreset.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntPreset.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntPreset.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntPreset.Location = New System.Drawing.Point(408, 176)
        Me.Button_CntPreset.Name = "Button_CntPreset"
        Me.Button_CntPreset.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntPreset.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntPreset.TabIndex = 10
        Me.Button_CntPreset.Text = "CntPreset"
        '
        'Button_CntStop
        '
        Me.Button_CntStop.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntStop.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntStop.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntStop.Location = New System.Drawing.Point(408, 208)
        Me.Button_CntStop.Name = "Button_CntStop"
        Me.Button_CntStop.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntStop.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntStop.TabIndex = 9
        Me.Button_CntStop.Text = "CntStopCount"
        '
        'Button_CntStart
        '
        Me.Button_CntStart.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntStart.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntStart.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntStart.Location = New System.Drawing.Point(408, 144)
        Me.Button_CntStart.Name = "Button_CntStart"
        Me.Button_CntStart.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntStart.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntStart.TabIndex = 8
        Me.Button_CntStart.Text = "CntStartCount"
        '
        'Button_CntCompare
        '
        Me.Button_CntCompare.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntCompare.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntCompare.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntCompare.Location = New System.Drawing.Point(408, 96)
        Me.Button_CntCompare.Name = "Button_CntCompare"
        Me.Button_CntCompare.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntCompare.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntCompare.TabIndex = 7
        Me.Button_CntCompare.Text = "比較設定..."
        '
        'Button_CntMode
        '
        Me.Button_CntMode.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntMode.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntMode.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntMode.Location = New System.Drawing.Point(408, 64)
        Me.Button_CntMode.Name = "Button_CntMode"
        Me.Button_CntMode.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntMode.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntMode.TabIndex = 6
        Me.Button_CntMode.Text = "モード設定..."
        '
        'Frame3
        '
        Me.Frame3.BackColor = System.Drawing.SystemColors.Control
        Me.Frame3.Controls.AddRange(New System.Windows.Forms.Control() {Me._Edit_Preset_7, Me._Edit_Preset_6, Me._Edit_Preset_5, Me._Edit_Preset_4, Me._Edit_Preset_3, Me._Edit_Preset_2, Me._Edit_Preset_1, Me._Edit_Preset_0, Me._Radio_Preset_1, Me._Radio_Preset_0})
        Me.Frame3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame3.Location = New System.Drawing.Point(296, 48)
        Me.Frame3.Name = "Frame3"
        Me.Frame3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame3.Size = New System.Drawing.Size(97, 257)
        Me.Frame3.TabIndex = 5
        Me.Frame3.TabStop = False
        Me.Frame3.Text = "プリセット値"
        '
        '_Edit_Preset_7
        '
        Me._Edit_Preset_7.AcceptsReturn = True
        Me._Edit_Preset_7.AutoSize = False
        Me._Edit_Preset_7.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_7.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_7.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_7.Location = New System.Drawing.Point(8, 224)
        Me._Edit_Preset_7.MaxLength = 0
        Me._Edit_Preset_7.Name = "_Edit_Preset_7"
        Me._Edit_Preset_7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_7.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_7.TabIndex = 40
        Me._Edit_Preset_7.Text = "Text1"
        '
        '_Edit_Preset_6
        '
        Me._Edit_Preset_6.AcceptsReturn = True
        Me._Edit_Preset_6.AutoSize = False
        Me._Edit_Preset_6.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_6.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_6.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_6.Location = New System.Drawing.Point(8, 200)
        Me._Edit_Preset_6.MaxLength = 0
        Me._Edit_Preset_6.Name = "_Edit_Preset_6"
        Me._Edit_Preset_6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_6.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_6.TabIndex = 39
        Me._Edit_Preset_6.Text = "Text1"
        '
        '_Edit_Preset_5
        '
        Me._Edit_Preset_5.AcceptsReturn = True
        Me._Edit_Preset_5.AutoSize = False
        Me._Edit_Preset_5.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_5.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_5.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_5.Location = New System.Drawing.Point(8, 176)
        Me._Edit_Preset_5.MaxLength = 0
        Me._Edit_Preset_5.Name = "_Edit_Preset_5"
        Me._Edit_Preset_5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_5.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_5.TabIndex = 38
        Me._Edit_Preset_5.Text = "Text1"
        '
        '_Edit_Preset_4
        '
        Me._Edit_Preset_4.AcceptsReturn = True
        Me._Edit_Preset_4.AutoSize = False
        Me._Edit_Preset_4.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_4.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_4.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_4.Location = New System.Drawing.Point(8, 152)
        Me._Edit_Preset_4.MaxLength = 0
        Me._Edit_Preset_4.Name = "_Edit_Preset_4"
        Me._Edit_Preset_4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_4.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_4.TabIndex = 37
        Me._Edit_Preset_4.Text = "Text1"
        '
        '_Edit_Preset_3
        '
        Me._Edit_Preset_3.AcceptsReturn = True
        Me._Edit_Preset_3.AutoSize = False
        Me._Edit_Preset_3.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_3.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_3.Location = New System.Drawing.Point(8, 128)
        Me._Edit_Preset_3.MaxLength = 0
        Me._Edit_Preset_3.Name = "_Edit_Preset_3"
        Me._Edit_Preset_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_3.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_3.TabIndex = 36
        Me._Edit_Preset_3.Text = "Text1"
        '
        '_Edit_Preset_2
        '
        Me._Edit_Preset_2.AcceptsReturn = True
        Me._Edit_Preset_2.AutoSize = False
        Me._Edit_Preset_2.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_2.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_2.Location = New System.Drawing.Point(8, 104)
        Me._Edit_Preset_2.MaxLength = 0
        Me._Edit_Preset_2.Name = "_Edit_Preset_2"
        Me._Edit_Preset_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_2.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_2.TabIndex = 35
        Me._Edit_Preset_2.Text = "Text1"
        '
        '_Edit_Preset_1
        '
        Me._Edit_Preset_1.AcceptsReturn = True
        Me._Edit_Preset_1.AutoSize = False
        Me._Edit_Preset_1.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_1.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_1.Location = New System.Drawing.Point(8, 80)
        Me._Edit_Preset_1.MaxLength = 0
        Me._Edit_Preset_1.Name = "_Edit_Preset_1"
        Me._Edit_Preset_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_1.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_1.TabIndex = 34
        Me._Edit_Preset_1.Text = "Text1"
        '
        '_Edit_Preset_0
        '
        Me._Edit_Preset_0.AcceptsReturn = True
        Me._Edit_Preset_0.AutoSize = False
        Me._Edit_Preset_0.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Preset_0.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Preset_0.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Preset_0.Location = New System.Drawing.Point(8, 56)
        Me._Edit_Preset_0.MaxLength = 0
        Me._Edit_Preset_0.Name = "_Edit_Preset_0"
        Me._Edit_Preset_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Preset_0.Size = New System.Drawing.Size(81, 18)
        Me._Edit_Preset_0.TabIndex = 33
        Me._Edit_Preset_0.Text = "Text1"
        '
        '_Radio_Preset_1
        '
        Me._Radio_Preset_1.BackColor = System.Drawing.SystemColors.Control
        Me._Radio_Preset_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Radio_Preset_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me._Radio_Preset_1.Location = New System.Drawing.Point(16, 32)
        Me._Radio_Preset_1.Name = "_Radio_Preset_1"
        Me._Radio_Preset_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Radio_Preset_1.Size = New System.Drawing.Size(65, 17)
        Me._Radio_Preset_1.TabIndex = 32
        Me._Radio_Preset_1.TabStop = True
        Me._Radio_Preset_1.Text = "16進数"
        '
        '_Radio_Preset_0
        '
        Me._Radio_Preset_0.BackColor = System.Drawing.SystemColors.Control
        Me._Radio_Preset_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Radio_Preset_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me._Radio_Preset_0.Location = New System.Drawing.Point(16, 16)
        Me._Radio_Preset_0.Name = "_Radio_Preset_0"
        Me._Radio_Preset_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Radio_Preset_0.Size = New System.Drawing.Size(65, 17)
        Me._Radio_Preset_0.TabIndex = 31
        Me._Radio_Preset_0.TabStop = True
        Me._Radio_Preset_0.Text = "10進数"
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me._Edit_Status_7, Me._Edit_Status_6, Me._Edit_Status_5, Me._Edit_Status_4, Me._Edit_Status_3, Me._Edit_Status_2, Me._Edit_Status_1, Me._Edit_Status_0})
        Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame2.Location = New System.Drawing.Point(192, 48)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(97, 257)
        Me.Frame2.TabIndex = 4
        Me.Frame2.TabStop = False
        Me.Frame2.Text = "ステータス"
        '
        '_Edit_Status_7
        '
        Me._Edit_Status_7.AcceptsReturn = True
        Me._Edit_Status_7.AutoSize = False
        Me._Edit_Status_7.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_7.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_7.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_7.Location = New System.Drawing.Point(8, 224)
        Me._Edit_Status_7.MaxLength = 0
        Me._Edit_Status_7.Name = "_Edit_Status_7"
        Me._Edit_Status_7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_7.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_7.TabIndex = 30
        Me._Edit_Status_7.Text = "Text1"
        '
        '_Edit_Status_6
        '
        Me._Edit_Status_6.AcceptsReturn = True
        Me._Edit_Status_6.AutoSize = False
        Me._Edit_Status_6.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_6.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_6.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_6.Location = New System.Drawing.Point(8, 200)
        Me._Edit_Status_6.MaxLength = 0
        Me._Edit_Status_6.Name = "_Edit_Status_6"
        Me._Edit_Status_6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_6.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_6.TabIndex = 29
        Me._Edit_Status_6.Text = "Text1"
        '
        '_Edit_Status_5
        '
        Me._Edit_Status_5.AcceptsReturn = True
        Me._Edit_Status_5.AutoSize = False
        Me._Edit_Status_5.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_5.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_5.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_5.Location = New System.Drawing.Point(8, 176)
        Me._Edit_Status_5.MaxLength = 0
        Me._Edit_Status_5.Name = "_Edit_Status_5"
        Me._Edit_Status_5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_5.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_5.TabIndex = 28
        Me._Edit_Status_5.Text = "Text1"
        '
        '_Edit_Status_4
        '
        Me._Edit_Status_4.AcceptsReturn = True
        Me._Edit_Status_4.AutoSize = False
        Me._Edit_Status_4.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_4.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_4.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_4.Location = New System.Drawing.Point(8, 152)
        Me._Edit_Status_4.MaxLength = 0
        Me._Edit_Status_4.Name = "_Edit_Status_4"
        Me._Edit_Status_4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_4.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_4.TabIndex = 27
        Me._Edit_Status_4.Text = "Text1"
        '
        '_Edit_Status_3
        '
        Me._Edit_Status_3.AcceptsReturn = True
        Me._Edit_Status_3.AutoSize = False
        Me._Edit_Status_3.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_3.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_3.Location = New System.Drawing.Point(8, 128)
        Me._Edit_Status_3.MaxLength = 0
        Me._Edit_Status_3.Name = "_Edit_Status_3"
        Me._Edit_Status_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_3.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_3.TabIndex = 26
        Me._Edit_Status_3.Text = "Text1"
        '
        '_Edit_Status_2
        '
        Me._Edit_Status_2.AcceptsReturn = True
        Me._Edit_Status_2.AutoSize = False
        Me._Edit_Status_2.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_2.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_2.Location = New System.Drawing.Point(8, 104)
        Me._Edit_Status_2.MaxLength = 0
        Me._Edit_Status_2.Name = "_Edit_Status_2"
        Me._Edit_Status_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_2.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_2.TabIndex = 25
        Me._Edit_Status_2.Text = "Text1"
        '
        '_Edit_Status_1
        '
        Me._Edit_Status_1.AcceptsReturn = True
        Me._Edit_Status_1.AutoSize = False
        Me._Edit_Status_1.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_1.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_1.Location = New System.Drawing.Point(8, 80)
        Me._Edit_Status_1.MaxLength = 0
        Me._Edit_Status_1.Name = "_Edit_Status_1"
        Me._Edit_Status_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_1.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_1.TabIndex = 24
        Me._Edit_Status_1.Text = "Text1"
        '
        '_Edit_Status_0
        '
        Me._Edit_Status_0.AcceptsReturn = True
        Me._Edit_Status_0.AutoSize = False
        Me._Edit_Status_0.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Status_0.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Status_0.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Status_0.Location = New System.Drawing.Point(8, 56)
        Me._Edit_Status_0.MaxLength = 0
        Me._Edit_Status_0.Name = "_Edit_Status_0"
        Me._Edit_Status_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Status_0.Size = New System.Drawing.Size(65, 18)
        Me._Edit_Status_0.TabIndex = 23
        Me._Edit_Status_0.Text = "Text1"
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me._Edit_Ch_7, Me._Edit_Ch_6, Me._Edit_Ch_5, Me._Edit_Ch_4, Me._Edit_Ch_3, Me._Edit_Ch_2, Me._Edit_Ch_1, Me._Edit_Ch_0, Me._Radio_Ch_1, Me._Radio_Ch_0})
        Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame1.Location = New System.Drawing.Point(56, 48)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(129, 257)
        Me.Frame1.TabIndex = 3
        Me.Frame1.TabStop = False
        Me.Frame1.Text = "カウント値"
        '
        '_Edit_Ch_7
        '
        Me._Edit_Ch_7.AcceptsReturn = True
        Me._Edit_Ch_7.AutoSize = False
        Me._Edit_Ch_7.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_7.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_7.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_7.Location = New System.Drawing.Point(8, 224)
        Me._Edit_Ch_7.MaxLength = 0
        Me._Edit_Ch_7.Name = "_Edit_Ch_7"
        Me._Edit_Ch_7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_7.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_7.TabIndex = 22
        Me._Edit_Ch_7.Text = "Text1"
        '
        '_Edit_Ch_6
        '
        Me._Edit_Ch_6.AcceptsReturn = True
        Me._Edit_Ch_6.AutoSize = False
        Me._Edit_Ch_6.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_6.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_6.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_6.Location = New System.Drawing.Point(8, 200)
        Me._Edit_Ch_6.MaxLength = 0
        Me._Edit_Ch_6.Name = "_Edit_Ch_6"
        Me._Edit_Ch_6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_6.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_6.TabIndex = 21
        Me._Edit_Ch_6.Text = "Text1"
        '
        '_Edit_Ch_5
        '
        Me._Edit_Ch_5.AcceptsReturn = True
        Me._Edit_Ch_5.AutoSize = False
        Me._Edit_Ch_5.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_5.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_5.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_5.Location = New System.Drawing.Point(8, 176)
        Me._Edit_Ch_5.MaxLength = 0
        Me._Edit_Ch_5.Name = "_Edit_Ch_5"
        Me._Edit_Ch_5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_5.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_5.TabIndex = 20
        Me._Edit_Ch_5.Text = "Text1"
        '
        '_Edit_Ch_4
        '
        Me._Edit_Ch_4.AcceptsReturn = True
        Me._Edit_Ch_4.AutoSize = False
        Me._Edit_Ch_4.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_4.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_4.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_4.Location = New System.Drawing.Point(8, 152)
        Me._Edit_Ch_4.MaxLength = 0
        Me._Edit_Ch_4.Name = "_Edit_Ch_4"
        Me._Edit_Ch_4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_4.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_4.TabIndex = 19
        Me._Edit_Ch_4.Text = "Text1"
        '
        '_Edit_Ch_3
        '
        Me._Edit_Ch_3.AcceptsReturn = True
        Me._Edit_Ch_3.AutoSize = False
        Me._Edit_Ch_3.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_3.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_3.Location = New System.Drawing.Point(8, 128)
        Me._Edit_Ch_3.MaxLength = 0
        Me._Edit_Ch_3.Name = "_Edit_Ch_3"
        Me._Edit_Ch_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_3.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_3.TabIndex = 18
        Me._Edit_Ch_3.Text = "Text1"
        '
        '_Edit_Ch_2
        '
        Me._Edit_Ch_2.AcceptsReturn = True
        Me._Edit_Ch_2.AutoSize = False
        Me._Edit_Ch_2.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_2.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_2.Location = New System.Drawing.Point(8, 104)
        Me._Edit_Ch_2.MaxLength = 0
        Me._Edit_Ch_2.Name = "_Edit_Ch_2"
        Me._Edit_Ch_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_2.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_2.TabIndex = 17
        Me._Edit_Ch_2.Text = "Text1"
        '
        '_Edit_Ch_1
        '
        Me._Edit_Ch_1.AcceptsReturn = True
        Me._Edit_Ch_1.AutoSize = False
        Me._Edit_Ch_1.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_1.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_1.Location = New System.Drawing.Point(8, 80)
        Me._Edit_Ch_1.MaxLength = 0
        Me._Edit_Ch_1.Name = "_Edit_Ch_1"
        Me._Edit_Ch_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_1.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_1.TabIndex = 16
        Me._Edit_Ch_1.Text = "Text1"
        '
        '_Edit_Ch_0
        '
        Me._Edit_Ch_0.AcceptsReturn = True
        Me._Edit_Ch_0.AutoSize = False
        Me._Edit_Ch_0.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Ch_0.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Ch_0.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Ch_0.Location = New System.Drawing.Point(8, 56)
        Me._Edit_Ch_0.MaxLength = 0
        Me._Edit_Ch_0.Name = "_Edit_Ch_0"
        Me._Edit_Ch_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Ch_0.Size = New System.Drawing.Size(113, 18)
        Me._Edit_Ch_0.TabIndex = 15
        Me._Edit_Ch_0.Text = "Text1"
        '
        '_Radio_Ch_1
        '
        Me._Radio_Ch_1.BackColor = System.Drawing.SystemColors.Control
        Me._Radio_Ch_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Radio_Ch_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me._Radio_Ch_1.Location = New System.Drawing.Point(32, 32)
        Me._Radio_Ch_1.Name = "_Radio_Ch_1"
        Me._Radio_Ch_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Radio_Ch_1.Size = New System.Drawing.Size(65, 17)
        Me._Radio_Ch_1.TabIndex = 14
        Me._Radio_Ch_1.Text = "16進数"
        '
        '_Radio_Ch_0
        '
        Me._Radio_Ch_0.BackColor = System.Drawing.SystemColors.Control
        Me._Radio_Ch_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Radio_Ch_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me._Radio_Ch_0.Location = New System.Drawing.Point(32, 16)
        Me._Radio_Ch_0.Name = "_Radio_Ch_0"
        Me._Radio_Ch_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Radio_Ch_0.Size = New System.Drawing.Size(65, 17)
        Me._Radio_Ch_0.TabIndex = 13
        Me._Radio_Ch_0.Text = "10進数"
        '
        'Button_CntInit
        '
        Me.Button_CntInit.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntInit.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntInit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_CntInit.Location = New System.Drawing.Point(408, 16)
        Me.Button_CntInit.Name = "Button_CntInit"
        Me.Button_CntInit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_CntInit.Size = New System.Drawing.Size(97, 20)
        Me.Button_CntInit.TabIndex = 2
        Me.Button_CntInit.Text = "CntInit"
        '
        'Edit_DeviceName
        '
        Me.Edit_DeviceName.AcceptsReturn = True
        Me.Edit_DeviceName.AutoSize = False
        Me.Edit_DeviceName.BackColor = System.Drawing.SystemColors.Window
        Me.Edit_DeviceName.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Edit_DeviceName.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Edit_DeviceName.Location = New System.Drawing.Point(96, 16)
        Me.Edit_DeviceName.MaxLength = 0
        Me.Edit_DeviceName.Name = "Edit_DeviceName"
        Me.Edit_DeviceName.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Edit_DeviceName.Size = New System.Drawing.Size(97, 18)
        Me.Edit_DeviceName.TabIndex = 0
        Me.Edit_DeviceName.Text = "Text1"
        '
        'Label12
        '
        Me.Label12.BackColor = System.Drawing.SystemColors.Control
        Me.Label12.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label12.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label12.Location = New System.Drawing.Point(8, 272)
        Me.Label12.Name = "Label12"
        Me.Label12.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label12.Size = New System.Drawing.Size(41, 17)
        Me.Label12.TabIndex = 53
        Me.Label12.Text = "ﾁｬﾈﾙ7"
        '
        'Label11
        '
        Me.Label11.BackColor = System.Drawing.SystemColors.Control
        Me.Label11.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label11.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label11.Location = New System.Drawing.Point(8, 248)
        Me.Label11.Name = "Label11"
        Me.Label11.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label11.Size = New System.Drawing.Size(41, 17)
        Me.Label11.TabIndex = 52
        Me.Label11.Text = "ﾁｬﾈﾙ6"
        '
        'Label10
        '
        Me.Label10.BackColor = System.Drawing.SystemColors.Control
        Me.Label10.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label10.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label10.Location = New System.Drawing.Point(16, 240)
        Me.Label10.Name = "Label10"
        Me.Label10.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label10.Size = New System.Drawing.Size(17, 1)
        Me.Label10.TabIndex = 51
        Me.Label10.Text = "Label10"
        '
        'Label9
        '
        Me.Label9.BackColor = System.Drawing.SystemColors.Control
        Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label9.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label9.Location = New System.Drawing.Point(8, 224)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(41, 17)
        Me.Label9.TabIndex = 50
        Me.Label9.Text = "ﾁｬﾈﾙ5"
        '
        'Label8
        '
        Me.Label8.BackColor = System.Drawing.SystemColors.Control
        Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label8.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label8.Location = New System.Drawing.Point(8, 200)
        Me.Label8.Name = "Label8"
        Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label8.Size = New System.Drawing.Size(41, 17)
        Me.Label8.TabIndex = 49
        Me.Label8.Text = "ﾁｬﾈﾙ4"
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.SystemColors.Control
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label7.Location = New System.Drawing.Point(8, 176)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(41, 17)
        Me.Label7.TabIndex = 48
        Me.Label7.Text = "ﾁｬﾈﾙ3"
        '
        'Label6
        '
        Me.Label6.BackColor = System.Drawing.SystemColors.Control
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(8, 152)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(41, 17)
        Me.Label6.TabIndex = 47
        Me.Label6.Text = "ﾁｬﾈﾙ2"
        '
        '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, 128)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(41, 17)
        Me.Label5.TabIndex = 46
        Me.Label5.Text = "ﾁｬﾈﾙ1"
        '
        '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, 104)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(49, 17)
        Me.Label4.TabIndex = 45
        Me.Label4.Text = "ﾁｬﾈﾙ0"
        '
        '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, 352)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(57, 17)
        Me.Label3.TabIndex = 44
        Me.Label3.Text = "戻り値："
        '
        '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(8, 320)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(64, 17)
        Me.Label2.TabIndex = 43
        Me.Label2.Text = "比較結果："
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(8, 16)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(73, 17)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "デバイス名："
        '
        'Counter
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
        Me.ClientSize = New System.Drawing.Size(513, 388)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Edit_ReturnCode, Me.Edit_CompResult, Me.Button_CntExit, Me.Button_Exit, Me.Button_CntPreset, Me.Button_CntStop, Me.Button_CntStart, Me.Button_CntCompare, Me.Button_CntMode, Me.Frame3, Me.Frame2, Me.Frame1, Me.Button_CntInit, Me.Edit_DeviceName, Me.Label12, Me.Label11, Me.Label10, Me.Label9, Me.Label8, Me.Label7, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1})
        Me.Location = New System.Drawing.Point(4, 23)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Counter"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
        Me.Text = "カウンタサンプル"
        Me.Frame3.ResumeLayout(False)
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
#End Region 
#Region "アップグレード ウィザードのサポート コード"
	Private Shared m_vb6FormDefInstance As Counter
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As Counter
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New Counter()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
	
    Dim Ret As Integer                      ' 戻り値
    Dim szError As New StringBuilder("", 256)      ' エラー文字列
    Dim szText As New String("", 100)       ' テンポラリ文字列
    Dim Edit_Ch(7) As TextBox
    Dim Edit_Status(7) As TextBox
    Dim Edit_Preset(7) As TextBox

	'---------------------------------------------------------
	' ダイアログ初期化
	'---------------------------------------------------------
	Private Sub Counter_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
		
		Dim i As Short
		Dim PresetData As Integer
		
        Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
        Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
		
        Edit_Ch(0) = _Edit_Ch_0
        Edit_Ch(1) = _Edit_Ch_1
        Edit_Ch(2) = _Edit_Ch_2
        Edit_Ch(3) = _Edit_Ch_3
        Edit_Ch(4) = _Edit_Ch_4
        Edit_Ch(5) = _Edit_Ch_5
        Edit_Ch(6) = _Edit_Ch_6
        Edit_Ch(7) = _Edit_Ch_7

        Edit_Status(0) = _Edit_Status_0
        Edit_Status(1) = _Edit_Status_1
        Edit_Status(2) = _Edit_Status_2
        Edit_Status(3) = _Edit_Status_3
        Edit_Status(4) = _Edit_Status_4
        Edit_Status(5) = _Edit_Status_5
        Edit_Status(6) = _Edit_Status_6
        Edit_Status(7) = _Edit_Status_7

        Edit_Preset(0) = _Edit_Preset_0
        Edit_Preset(1) = _Edit_Preset_1
        Edit_Preset(2) = _Edit_Preset_2
        Edit_Preset(3) = _Edit_Preset_3
        Edit_Preset(4) = _Edit_Preset_4
        Edit_Preset(5) = _Edit_Preset_5
        Edit_Preset(6) = _Edit_Preset_6
        Edit_Preset(7) = _Edit_Preset_7

		'画面アイテムの初期化
		Edit_DeviceName.Text = "CNT000"
        Edit_CompResult.Text = ""
        _Radio_Ch_0.Checked = True
        _Radio_Preset_0.Checked = True
		
		'カウント値
		For i = 0 To 7
			Edit_Ch(i).Text = ""
		Next i
		
		'ステータス
		For i = 0 To 7
			Edit_Status(i).Text = ""
		Next i
		
		'プリセット値
		For i = 0 To 7
			PresetData = i * 100
            ' プリセット値を符号無しで表示するため、一度16進文字例変換を経由
			Edit_Preset(i).Text = CStr(Convert.ToUInt32(Hex(PresetData), 16))
		Next i
        Edit_ReturnCode.Text = ""

    End Sub

    '---------------------------------------------------------
    ' 初期化処理
    '---------------------------------------------------------
    Private Sub Button_CntInit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntInit.Click

        Dim szDeviceName As String
        Dim i As Short

        ' 画面からデバイス名を取得する
        szDeviceName = Edit_DeviceName.Text

        ' 初期化処理を行ない、IDを取得する
        Ret = CntInit(szDeviceName, Id)

        ' エラー処理
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()
        If (Ret <> CNT_ERR_SUCCESS) Then
            Exit Sub
        End If

        ' 総チャネル数を取得
        Call CntGetMaxChannels(Id, ChannelNum)

        ' カウンタ、ステータス、プリセット
        ' 表示の無効化
        For i = ChannelNum To 7
            Edit_Ch(i).Enabled = False
            Edit_Status(i).Enabled = False
            Edit_Preset(i).Enabled = False
        Next i

    End Sub

    '---------------------------------------------------------
    ' 終了処理
    '---------------------------------------------------------
    Private Sub Button_CntExit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntExit.Click

        ' タイマを停止
        CntTimer.Enabled = False

        ' 終了処理を行う
        Ret = CntExit(Id)

        ' エラー処理
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()

    End Sub

    '---------------------------------------------------------
    ' ダイアログ終了
    '---------------------------------------------------------
    Private Sub Button_Exit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_Exit.Click

        ' タイマを停止
        CntTimer.Enabled = False

        ' 終了処理を行う
        Ret = CntExit(Id)

        ' ダイアログを終了する
        End

    End Sub

    '---------------------------------------------------------
    ' モードダイアログ表示
    '---------------------------------------------------------
    Private Sub Button_CntMode_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntMode.Click

        ' ダイアログをモーダルで表示
        Mode.DefInstance.ShowDialog()

    End Sub

    '---------------------------------------------------------
    ' 比較ダイアログ表示
    '---------------------------------------------------------
    Private Sub Button_CntCompare_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntCompare.Click

        ' ダイアログをモーダルで表示
        Comp.DefInstance.ShowDialog()

    End Sub

    '---------------------------------------------------------
    ' カウンタスタート
    '---------------------------------------------------------
    Private Sub Button_CntStart_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntStart.Click

        Dim ChNo(8) As Short
        Dim i As Short

        ' パラメータの設定
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
        Next i

        ' カウンタスタート
        Ret = CntStartCount(Id, ChNo, ChannelNum)

        ' エラー処理
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()
        If (Ret <> CNT_ERR_SUCCESS) Then
            Exit Sub
        End If

        ' タイマを起動
        CntTimer.Enabled = True

    End Sub

    '---------------------------------------------------------
    ' カウンタストップ
    '---------------------------------------------------------
    Private Sub Button_CntStop_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntStop.Click

        Dim ChNo(8) As Short
        Dim i As Short

        ' パラメータの設定
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
        Next i

        ' カウンタストップ
        Ret = CntStopCount(Id, ChNo, ChannelNum)

        ' エラー処理
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()

        ' タイマを停止
        CntTimer.Enabled = False

    End Sub

    '---------------------------------------------------------
    ' プリセット
    '---------------------------------------------------------
    Private Sub Button_CntPreset_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntPreset.Click

        Dim ChNo(8) As Short
        Dim PresetData(8) As Integer
        Dim i As Short

        ' 画面からのデータ取得とパラメータの設定
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
            szText = Edit_Preset(i).Text
            If _Radio_Preset_0.Checked = True Then
                ' プリセット値を符号ありで設定するため、一度16進文字例変換を経由
                PresetData(i) = Convert.ToInt32(Hex(Val(szText)), 16)
            Else
                PresetData(i) = Val("&H" & szText)
            End If
        Next i

        ' プリセット
        Ret = CntPreset(Id, ChNo, ChannelNum, PresetData)

        ' エラー処理
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()

    End Sub


    '---------------------------------------------------------
    ' 10進数／16進数変換処理(カウンタ値)
    '---------------------------------------------------------
    Private Sub _Radio_Ch_0_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Radio_Ch_0.CheckedChanged
        CntTimer_Tick(CntTimer, New System.EventArgs())
    End Sub

    Private Sub _Radio_Ch_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Radio_Ch_1.CheckedChanged
        CntTimer_Tick(CntTimer, New System.EventArgs())
    End Sub

    '---------------------------------------------------------
    ' 10進数変換処理(プリセット値)
    '---------------------------------------------------------
    Private Sub _Radio_Preset_0_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Radio_Preset_0.CheckedChanged
        Dim i As Short
        Dim PresetData As Integer

        If _Radio_Preset_0.Checked = True Then
            For i = 0 To 7
                szText = Edit_Preset(i).Text
                PresetData = Val("&H" & szText)
                ' プリセット値を符号無しで表示するため、一度16進文字例変換を経由
                Edit_Preset(i).Text = CStr(Convert.ToUInt32(Hex(PresetData), 16))
            Next i
        End If
    End Sub

    '---------------------------------------------------------
    ' 16進数変換処理(プリセット値)
    '---------------------------------------------------------
    Private Sub _Radio_Preset_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Radio_Preset_1.CheckedChanged
        Dim i As Short
        Dim PresetData As Integer

        If _Radio_Preset_1.Checked = True Then
            For i = 0 To 7
                szText = Edit_Preset(i).Text
                ' プリセット値を符号ありで設定するため、一度16進文字例変換を経由
                PresetData = Convert.ToInt32(Hex(Val(szText)), 16)
                Edit_Preset(i).Text = Hex(PresetData)
            Next i
        End If
    End Sub

    '---------------------------------------------------------
    ' サブルーチン：HIWORD/LOWORD
    '---------------------------------------------------------
    Function HiLoWord(ByRef Number As Integer, ByRef HiLo As Short) As Integer

        Dim Hi As Integer
        Dim Lo As Integer
        Dim StrData As String
        Dim i As Short

        StrData = Hex(Number)
        If Len(StrData) < 8 Then
            For i = 1 To 8 - Len(StrData)
                StrData = "0" & StrData
            Next i
        End If

        Lo = Val("&h" & VB.Right(StrData, 4))
        Hi = Val("&h" & VB.Left(StrData, 4))
        If HiLo = 0 Then
            HiLoWord = Lo
        ElseIf HiLo = 1 Then
            HiLoWord = Hi
        End If

    End Function

    '---------------------------------------------------------
    ' タイマ処理
    '---------------------------------------------------------
    Private Sub CntTimer_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CntTimer.Tick

        Dim ChNo(8) As Short
        Dim CountData(8) As Integer
        Dim Sts(8) As Short
        Dim i As Short
        Dim bIs10 As Boolean

        ' パラメータを設定
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
            CountData(i) = 0
        Next i

        ' カウント値を取得
        Ret = CntReadCount(Id, ChNo, ChannelNum, CountData)

        ' エラー処理
        If (Ret <> CNT_ERR_SUCCESS) Then
            Call CntGetErrorString(Ret, szError)
            Edit_ReturnCode.Text = "CntReadCount Ret = " & Ret & ":" & szError.ToString()
            CntTimer.Enabled = False
            Exit Sub
        End If

        ' ステータスを取得
        For i = 0 To ChannelNum - 1
            Ret = CntReadStatus(Id, i, Sts(i))

            ' エラー処理
            If (Ret <> CNT_ERR_SUCCESS) Then
                Call CntGetErrorString(Ret, szError)
                Edit_ReturnCode.Text = "CntReadStatus Ret = " & Ret & ":" & szError.ToString()
                CntTimer.Enabled = False
                Exit Sub
            End If
        Next i

        ' カウントデータ、ステータスデータ表示
        bIs10 = _Radio_Ch_0.Checked '-------
        For i = 0 To ChannelNum - 1
            If bIs10 = True Then
                ' カウントデータを符号無しで表示するため、一度16進文字例変換を経由
                szText = Str(Convert.ToUInt32(Hex(CountData(i)), 16))
            Else
                szText = Hex(CountData(i))          '----------%08X
            End If

            Edit_Ch(i).Text = szText
            szText = Hex(Sts(i))                    '----------%02X
            Edit_Status(i).Text = szText
        Next i

    End Sub

    '---------------------------------------------------------
    ' サブルーチン：メッセージ処理
    '---------------------------------------------------------
    Private Sub CountMatch(ByVal ChNo As Short, ByVal UpDown As Short, ByVal dwCount As Integer)

        Dim szUpDown As String

        ' 画面データを作成
        szUpDown = ""

        If (UpDown = CNTM_DIR_UP) Then
            szUpDown = "Up"
        End If

        If (UpDown = CNTM_DIR_DOWN) Then
            szUpDown = "Down"
        End If

        ' 表示
        ' カウントデータを符号無しで表示するため、一度16進文字例変換を経由
        Edit_CompResult.Text = "Ch : " & ChNo & " Count= " & Str(Convert.ToUInt32(Hex(dwCount), 16)) & ":" & szUpDown

    End Sub

    '---------------------------------------------------------
    ' メッセージ処理
    '---------------------------------------------------------
    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)

        ' LOWORD(wParam)=CntInit関数で取得したID
        ' HIWORD(wParam)=方向(UP=1, DOWN=2)
        ' lParam=比較値
        Dim ChNo As Short
        Dim UpDown As Integer
        Dim dwCount As Integer

        ' Id = HiLoWord(m.WParam.ToInt32, 0)

        Select Case m.Msg
            Case CNTM_COUNTUP_CH0
                ChNo = 0
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH1
                ChNo = 1
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH2
                ChNo = 2
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH3
                ChNo = 3
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH4
                ChNo = 4
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH5
                ChNo = 5
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH6
                ChNo = 6
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
            Case CNTM_COUNTUP_CH7
                ChNo = 7
                UpDown = HiLoWord(m.WParam.ToInt32, 1)
                ' 比較値を符号ありで設定するため、一度16進文字例変換を経由
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
        End Select

        MyBase.WndProc(m)
    End Sub

End Class