﻿Option Strict Off
Option Explicit On 
Imports System.Text

Friend Class Comp
	Inherits System.Windows.Forms.Form
#Region "Windows Form Designer generated code "
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'For the start-up form, the first instance created is the default instance.
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'This call is required by the Windows Form Designer.
		InitializeComponent()
	End Sub
	'Form overrides dispose to clean up the component list.
	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
	'Required by the Windows Form Designer
	Private components As System.ComponentModel.IContainer
	Public ToolTip1 As System.Windows.Forms.ToolTip
	Public WithEvents Button_Cancel As System.Windows.Forms.Button
	Public WithEvents Button_OK As System.Windows.Forms.Button
	Public WithEvents Combo_Pulse As System.Windows.Forms.ComboBox
	Public WithEvents Label9 As System.Windows.Forms.Label
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
	Public WithEvents _Edit_Comp_7 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_6 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_5 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_4 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_3 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_2 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_1 As System.Windows.Forms.TextBox
	Public WithEvents _Edit_Comp_0 As System.Windows.Forms.TextBox
	Public WithEvents _Radio_Comp_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Radio_Comp_0 As System.Windows.Forms.RadioButton
	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
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
	'Do not modify it using the code editor.
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.Button_Cancel = New System.Windows.Forms.Button()
        Me.Button_OK = New System.Windows.Forms.Button()
        Me.Frame2 = New System.Windows.Forms.GroupBox()
        Me.Combo_Pulse = New System.Windows.Forms.ComboBox()
        Me.Label9 = New System.Windows.Forms.Label()
        Me.Frame1 = New System.Windows.Forms.GroupBox()
        Me._Edit_Comp_7 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_6 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_5 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_4 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_3 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_2 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_1 = New System.Windows.Forms.TextBox()
        Me._Edit_Comp_0 = New System.Windows.Forms.TextBox()
        Me._Radio_Comp_1 = New System.Windows.Forms.RadioButton()
        Me._Radio_Comp_0 = New System.Windows.Forms.RadioButton()
        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.Frame2.SuspendLayout()
        Me.Frame1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Button_Cancel
        '
        Me.Button_Cancel.BackColor = System.Drawing.SystemColors.Control
        Me.Button_Cancel.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_Cancel.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Button_Cancel.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_Cancel.Location = New System.Drawing.Point(152, 328)
        Me.Button_Cancel.Name = "Button_Cancel"
        Me.Button_Cancel.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_Cancel.Size = New System.Drawing.Size(89, 20)
        Me.Button_Cancel.TabIndex = 13
        Me.Button_Cancel.Text = "Cancel"
        '
        'Button_OK
        '
        Me.Button_OK.BackColor = System.Drawing.SystemColors.Control
        Me.Button_OK.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_OK.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Button_OK.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Button_OK.Location = New System.Drawing.Point(40, 328)
        Me.Button_OK.Name = "Button_OK"
        Me.Button_OK.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Button_OK.Size = New System.Drawing.Size(89, 20)
        Me.Button_OK.TabIndex = 12
        Me.Button_OK.Text = "OK"
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.AddRange(New System.Windows.Forms.Control() {Me.Combo_Pulse, Me.Label9})
        Me.Frame2.Font = New System.Drawing.Font("Arial", 8.0!, 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(24, 264)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(233, 57)
        Me.Frame2.TabIndex = 11
        Me.Frame2.TabStop = False
        Me.Frame2.Text = "Pulse set consistent with count"
        '
        'Combo_Pulse
        '
        Me.Combo_Pulse.BackColor = System.Drawing.SystemColors.Window
        Me.Combo_Pulse.Cursor = System.Windows.Forms.Cursors.Default
        Me.Combo_Pulse.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.Combo_Pulse.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Combo_Pulse.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Combo_Pulse.Location = New System.Drawing.Point(96, 24)
        Me.Combo_Pulse.Name = "Combo_Pulse"
        Me.Combo_Pulse.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Combo_Pulse.Size = New System.Drawing.Size(121, 22)
        Me.Combo_Pulse.TabIndex = 23
        '
        'Label9
        '
        Me.Label9.BackColor = System.Drawing.SystemColors.Control
        Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label9.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label9.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label9.Location = New System.Drawing.Point(16, 24)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(72, 17)
        Me.Label9.TabIndex = 22
        Me.Label9.Text = "Pulse Width:"
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me._Edit_Comp_7, Me._Edit_Comp_6, Me._Edit_Comp_5, Me._Edit_Comp_4, Me._Edit_Comp_3, Me._Edit_Comp_2, Me._Edit_Comp_1, Me._Edit_Comp_0, Me._Radio_Comp_1, Me._Radio_Comp_0, Me.Label8, Me.Label7, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1})
        Me.Frame1.Font = New System.Drawing.Font("Arial", 8.0!, 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(24, 8)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(233, 249)
        Me.Frame1.TabIndex = 0
        Me.Frame1.TabStop = False
        Me.Frame1.Text = "Comparison register set"
        '
        '_Edit_Comp_7
        '
        Me._Edit_Comp_7.AcceptsReturn = True
        Me._Edit_Comp_7.AutoSize = False
        Me._Edit_Comp_7.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_7.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_7.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_7.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_7.Location = New System.Drawing.Point(96, 224)
        Me._Edit_Comp_7.MaxLength = 0
        Me._Edit_Comp_7.Name = "_Edit_Comp_7"
        Me._Edit_Comp_7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_7.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_7.TabIndex = 10
        Me._Edit_Comp_7.Text = "Text1"
        '
        '_Edit_Comp_6
        '
        Me._Edit_Comp_6.AcceptsReturn = True
        Me._Edit_Comp_6.AutoSize = False
        Me._Edit_Comp_6.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_6.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_6.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_6.Location = New System.Drawing.Point(96, 200)
        Me._Edit_Comp_6.MaxLength = 0
        Me._Edit_Comp_6.Name = "_Edit_Comp_6"
        Me._Edit_Comp_6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_6.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_6.TabIndex = 9
        Me._Edit_Comp_6.Text = "Text1"
        '
        '_Edit_Comp_5
        '
        Me._Edit_Comp_5.AcceptsReturn = True
        Me._Edit_Comp_5.AutoSize = False
        Me._Edit_Comp_5.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_5.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_5.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_5.Location = New System.Drawing.Point(96, 176)
        Me._Edit_Comp_5.MaxLength = 0
        Me._Edit_Comp_5.Name = "_Edit_Comp_5"
        Me._Edit_Comp_5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_5.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_5.TabIndex = 8
        Me._Edit_Comp_5.Text = "Text1"
        '
        '_Edit_Comp_4
        '
        Me._Edit_Comp_4.AcceptsReturn = True
        Me._Edit_Comp_4.AutoSize = False
        Me._Edit_Comp_4.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_4.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_4.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_4.Location = New System.Drawing.Point(96, 152)
        Me._Edit_Comp_4.MaxLength = 0
        Me._Edit_Comp_4.Name = "_Edit_Comp_4"
        Me._Edit_Comp_4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_4.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_4.TabIndex = 7
        Me._Edit_Comp_4.Text = "Text1"
        '
        '_Edit_Comp_3
        '
        Me._Edit_Comp_3.AcceptsReturn = True
        Me._Edit_Comp_3.AutoSize = False
        Me._Edit_Comp_3.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_3.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_3.Location = New System.Drawing.Point(96, 128)
        Me._Edit_Comp_3.MaxLength = 0
        Me._Edit_Comp_3.Name = "_Edit_Comp_3"
        Me._Edit_Comp_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_3.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_3.TabIndex = 6
        Me._Edit_Comp_3.Text = "Text1"
        '
        '_Edit_Comp_2
        '
        Me._Edit_Comp_2.AcceptsReturn = True
        Me._Edit_Comp_2.AutoSize = False
        Me._Edit_Comp_2.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_2.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_2.Location = New System.Drawing.Point(96, 104)
        Me._Edit_Comp_2.MaxLength = 0
        Me._Edit_Comp_2.Name = "_Edit_Comp_2"
        Me._Edit_Comp_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_2.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_2.TabIndex = 5
        Me._Edit_Comp_2.Text = "Text1"
        '
        '_Edit_Comp_1
        '
        Me._Edit_Comp_1.AcceptsReturn = True
        Me._Edit_Comp_1.AutoSize = False
        Me._Edit_Comp_1.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_1.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_1.Location = New System.Drawing.Point(96, 80)
        Me._Edit_Comp_1.MaxLength = 0
        Me._Edit_Comp_1.Name = "_Edit_Comp_1"
        Me._Edit_Comp_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_1.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_1.TabIndex = 4
        Me._Edit_Comp_1.Text = "Text1"
        '
        '_Edit_Comp_0
        '
        Me._Edit_Comp_0.AcceptsReturn = True
        Me._Edit_Comp_0.AutoSize = False
        Me._Edit_Comp_0.BackColor = System.Drawing.SystemColors.Window
        Me._Edit_Comp_0.Cursor = System.Windows.Forms.Cursors.IBeam
        Me._Edit_Comp_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Edit_Comp_0.ForeColor = System.Drawing.SystemColors.WindowText
        Me._Edit_Comp_0.Location = New System.Drawing.Point(96, 56)
        Me._Edit_Comp_0.MaxLength = 0
        Me._Edit_Comp_0.Name = "_Edit_Comp_0"
        Me._Edit_Comp_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Edit_Comp_0.Size = New System.Drawing.Size(121, 18)
        Me._Edit_Comp_0.TabIndex = 3
        Me._Edit_Comp_0.Text = "Text1"
        '
        '_Radio_Comp_1
        '
        Me._Radio_Comp_1.BackColor = System.Drawing.SystemColors.Control
        Me._Radio_Comp_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Radio_Comp_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Radio_Comp_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me._Radio_Comp_1.Location = New System.Drawing.Point(96, 32)
        Me._Radio_Comp_1.Name = "_Radio_Comp_1"
        Me._Radio_Comp_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Radio_Comp_1.Size = New System.Drawing.Size(65, 17)
        Me._Radio_Comp_1.TabIndex = 2
        Me._Radio_Comp_1.TabStop = True
        Me._Radio_Comp_1.Text = "Hex"
        '
        '_Radio_Comp_0
        '
        Me._Radio_Comp_0.BackColor = System.Drawing.SystemColors.Control
        Me._Radio_Comp_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Radio_Comp_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Radio_Comp_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me._Radio_Comp_0.Location = New System.Drawing.Point(96, 16)
        Me._Radio_Comp_0.Name = "_Radio_Comp_0"
        Me._Radio_Comp_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Radio_Comp_0.Size = New System.Drawing.Size(65, 17)
        Me._Radio_Comp_0.TabIndex = 1
        Me._Radio_Comp_0.TabStop = True
        Me._Radio_Comp_0.Text = "Dec"
        '
        'Label8
        '
        Me.Label8.BackColor = System.Drawing.SystemColors.Control
        Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label8.Font = New System.Drawing.Font("Arial", 8.0!, 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(32, 224)
        Me.Label8.Name = "Label8"
        Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label8.Size = New System.Drawing.Size(56, 17)
        Me.Label8.TabIndex = 21
        Me.Label8.Text = "Channel7"
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.SystemColors.Control
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.Font = New System.Drawing.Font("Arial", 8.0!, 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(32, 200)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(56, 17)
        Me.Label7.TabIndex = 20
        Me.Label7.Text = "Channel6"
        '
        'Label6
        '
        Me.Label6.BackColor = System.Drawing.SystemColors.Control
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(32, 176)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(56, 17)
        Me.Label6.TabIndex = 19
        Me.Label6.Text = "Channel5"
        '
        'Label5
        '
        Me.Label5.BackColor = System.Drawing.SystemColors.Control
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label5.Location = New System.Drawing.Point(32, 152)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(64, 17)
        Me.Label5.TabIndex = 18
        Me.Label5.Text = "Channel4"
        '
        'Label4
        '
        Me.Label4.BackColor = System.Drawing.SystemColors.Control
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.Font = New System.Drawing.Font("Arial", 8.0!, 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(32, 128)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(56, 17)
        Me.Label4.TabIndex = 17
        Me.Label4.Text = "Channel3"
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.SystemColors.Control
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.Font = New System.Drawing.Font("Arial", 8.0!, 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(32, 104)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(56, 17)
        Me.Label3.TabIndex = 16
        Me.Label3.Text = "Channel2"
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.SystemColors.Control
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.Font = New System.Drawing.Font("Arial", 8.0!, 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(32, 80)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(56, 17)
        Me.Label2.TabIndex = 15
        Me.Label2.Text = "Channel1"
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.Font = New System.Drawing.Font("Arial", 8.0!, 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(32, 56)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(56, 17)
        Me.Label1.TabIndex = 14
        Me.Label1.Text = "Channel0"
        '
        'Comp
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(276, 370)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button_Cancel, Me.Button_OK, Me.Frame2, Me.Frame1})
        Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Location = New System.Drawing.Point(4, 23)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Comp"
        Me.Text = "Comparison Set"
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
#End Region 
#Region "Upgrade Support "
	Private Shared m_vb6FormDefInstance As Comp
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As Comp
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New Comp()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
    Dim Ret As Short ' return code
    Dim szError As New StringBuilder("", 256) ' error string
    Dim szReturnCode As New String("", 256) ' error string expressed
	
    Dim szText As New String("", 100) ' temporary string
	
	Dim CompValue() As Integer = {100, 200, 300, 400, 500, 600, 700, 800} ' comparison value
    Dim PulseWidth As Short ' pulse width
    Dim Edit_Comp(7) As TextBox
	
	'---------------------------------------------------------
	' dialog initialize
	'---------------------------------------------------------
	Private Sub Comp_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
		
		' screen item initialize
		Dim i As Short
		Dim ChNo As Short

        Edit_Comp(0) = _Edit_Comp_0
        Edit_Comp(1) = _Edit_Comp_1
        Edit_Comp(2) = _Edit_Comp_2
        Edit_Comp(3) = _Edit_Comp_3
        Edit_Comp(4) = _Edit_Comp_4
        Edit_Comp(5) = _Edit_Comp_5
        Edit_Comp(6) = _Edit_Comp_6
        Edit_Comp(7) = _Edit_Comp_7
		
		PulseWidth = 0
		
        _Radio_Comp_0.Checked = True
		
		For i = 0 To 7
            ' In order to display the comparison value to unsigned, convert it once through hexadecimal characters
            szText = Str(Convert.ToUInt32(Hex(CompValue(i)), 16))
            Edit_Comp(i).Text = szText
            If (i >= ChannelNum) Then
                Edit_Comp(i).Enabled = False
            End If
        Next i

        Combo_Pulse.Items.Clear()
        For i = 0 To &HFS
            szText = Hex(i)
            Combo_Pulse.Items.Add((szText))
        Next i

        ' get setting value
        ChNo = 0
        Call CntGetPulseWidth(Id, ChNo, PulseWidth)
        Combo_Pulse.SelectedIndex = PulseWidth

    End Sub

    '---------------------------------------------------------
    ' OK button
    '---------------------------------------------------------
    Private Sub Button_OK_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_OK.Click

        Dim i As Short

        ' get setting value from screen
        For i = 0 To 7
            szText = Edit_Comp(i).Text
            If _Radio_Comp_0.Checked = True Then
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                CompValue(i) = Convert.ToInt32(Hex(Val(szText)), 16)
            Else
                CompValue(i) = Val("&H" & szText)
            End If
        Next i

        szText = Combo_Pulse.Text
        PulseWidth = Val("&H" & szText)

        ' each channel
        For i = 0 To ChannelNum - 1

            ' set Comparison value
            Ret = CntNotifyCountUp(Id, i, 0, CompValue(i), Counter.DefInstance.Handle)

            ' error process
            If (Ret <> CNT_ERR_SUCCESS) Then
                Call CntGetErrorString(Ret, szError)
                szReturnCode = "CntNotifyCountUp : Ret = " & Ret & ":" & szError.ToString()
                MsgBox(szReturnCode, MsgBoxStyle.OKOnly, "Error")
                Exit For
            End If

            ' set pulse width
            Ret = CntSetPulseWidth(Id, i, PulseWidth)

            ' error process
            If (Ret <> CNT_ERR_SUCCESS) Then
                Call CntGetErrorString(Ret, szError)
                szReturnCode = "CntSetPulseWidth : Ret = " & Ret & ":" & szError.ToString()
                MsgBox(szReturnCode, MsgBoxStyle.OKOnly, "Error")
                Exit For
            End If
        Next i

        Me.Close()

    End Sub

    '---------------------------------------------------------
    ' Cancel button
    '---------------------------------------------------------
    Private Sub Button_Cancel_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_Cancel.Click

        Me.Close()

    End Sub

    '---------------------------------------------------------
    ' Comparison value expression change
    '---------------------------------------------------------
    'Dec
    Private Sub _Radio_Comp_0_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Radio_Comp_0.CheckedChanged
        Dim i As Short

        For i = 0 To 7
            ' In order to display the comparison value to unsigned, convert it once through hexadecimal characters
            szText = Str(Convert.ToUInt32(Hex(CompValue(i)), 16))
            Edit_Comp(i).Text = szText
        Next i
    End Sub

    'Hex
    Private Sub _Radio_Comp_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _Radio_Comp_1.CheckedChanged
        Dim i As Short

        For i = 0 To 7
            szText = Hex(CompValue(i))
            Edit_Comp(i).Text = szText
        Next i
    End Sub
End Class