﻿' Usual Counter Sample
Option Strict Off
Option Explicit On 
Imports VB = Microsoft.VisualBasic
Imports System.Text

Friend Class Counter
    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 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 _Radio_Preset_0 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
    '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.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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Edit_ReturnCode.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Edit_ReturnCode.Location = New System.Drawing.Point(80, 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(313, 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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Edit_CompResult.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Edit_CompResult.Location = New System.Drawing.Point(80, 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(313, 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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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 = "Comparison Set..."
        '
        'Button_CntMode
        '
        Me.Button_CntMode.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntMode.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntMode.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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 = "Mode Set..."
        '
        '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.Font = New System.Drawing.Font("Arial", 8.0!, 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(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 = "Preset Data"
        '
        '_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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Text = "Hex"
        '
        '_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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Text = "Dec"
        '
        '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.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(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 = "Status"
        '
        '_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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.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(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 = "Count Value"
        '
        '_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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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 = "Hex"
        '
        '_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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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 = "Dec"
        '
        'Button_CntInit
        '
        Me.Button_CntInit.BackColor = System.Drawing.SystemColors.Control
        Me.Button_CntInit.Cursor = System.Windows.Forms.Cursors.Default
        Me.Button_CntInit.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label12.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label12.Location = New System.Drawing.Point(0, 272)
        Me.Label12.Name = "Label12"
        Me.Label12.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label12.Size = New System.Drawing.Size(56, 17)
        Me.Label12.TabIndex = 53
        Me.Label12.Text = "Channel7"
        '
        'Label11
        '
        Me.Label11.BackColor = System.Drawing.SystemColors.Control
        Me.Label11.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label11.Font = New System.Drawing.Font("Arial", 8.0!, 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(0, 248)
        Me.Label11.Name = "Label11"
        Me.Label11.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label11.Size = New System.Drawing.Size(56, 17)
        Me.Label11.TabIndex = 52
        Me.Label11.Text = "Channel6"
        '
        'Label10
        '
        Me.Label10.BackColor = System.Drawing.SystemColors.Control
        Me.Label10.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label10.Font = New System.Drawing.Font("Arial", 8.0!, 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(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.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(0, 224)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(56, 17)
        Me.Label9.TabIndex = 50
        Me.Label9.Text = "Channel5"
        '
        '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(0, 200)
        Me.Label8.Name = "Label8"
        Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label8.Size = New System.Drawing.Size(56, 17)
        Me.Label8.TabIndex = 49
        Me.Label8.Text = "Channel4"
        '
        '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(0, 176)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(56, 17)
        Me.Label7.TabIndex = 48
        Me.Label7.Text = "Channel3"
        '
        '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(0, 152)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(56, 17)
        Me.Label6.TabIndex = 47
        Me.Label6.Text = "Channel2"
        '
        '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(0, 128)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(56, 17)
        Me.Label5.TabIndex = 46
        Me.Label5.Text = "Channel1"
        '
        '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(0, 104)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(56, 17)
        Me.Label4.TabIndex = 45
        Me.Label4.Text = "Channel0"
        '
        '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(8, 352)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(73, 17)
        Me.Label3.TabIndex = 44
        Me.Label3.Text = "Return code:"
        '
        '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(8, 320)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(73, 25)
        Me.Label2.TabIndex = 43
        Me.Label2.Text = "Comparison result:"
        '
        '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(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 = "Device name:"
        '
        'Counter
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        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.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 = "Counter"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
        Me.Text = "Counter Sample"
        Me.Frame3.ResumeLayout(False)
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
#End Region
#Region "Upgrade Support "
    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(ByVal Value As Counter)
            m_vb6FormDefInstance = Value
        End Set
    End Property
#End Region

    Dim Ret As Integer ' Return code
    Dim szError As New StringBuilder("", 256) ' Error code
    Dim szText As New String("", 100) ' Temporary
    Dim Edit_Ch(7) As TextBox
    Dim Edit_Status(7) As TextBox
    Dim Edit_Preset(7) As TextBox

    '---------------------------------------------------------
    ' Dialog initialization
    '---------------------------------------------------------
    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

        'Screen item initialize
        Edit_DeviceName.Text = "CNT000"
        Edit_CompResult.Text = ""
        _Radio_Ch_0.Checked = True
        _Radio_Preset_0.Checked = True

        'Count value
        For i = 0 To 7
            Edit_Ch(i).Text = ""
        Next i

        'Status
        For i = 0 To 7
            Edit_Status(i).Text = ""
        Next i

        'Preset value
        For i = 0 To 7
            PresetData = i * 100
            ' In order to display the preset value to unsigned, convert it once through hexadecimal characters
            Edit_Preset(i).Text = CStr(Convert.ToUInt32(Hex(PresetData), 16))
        Next i
        Edit_ReturnCode.Text = ""

    End Sub

    '---------------------------------------------------------
    ' Initialization process
    '---------------------------------------------------------
    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

        ' Get device name from screen
        szDeviceName = Edit_DeviceName.Text

        ' Initializtion function execute, get ID
        Ret = CntInit(szDeviceName, Id)

        ' Error process
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()
        If (Ret <> CNT_ERR_SUCCESS) Then
            Exit Sub
        End If

        ' Get all channel number
        Call CntGetMaxChannels(Id, ChannelNum)

        ' Counter、Status、Preset
        ' Exprocess invalidate
        For i = ChannelNum To 7
            Edit_Ch(i).Enabled = False
            Edit_Status(i).Enabled = False
            Edit_Preset(i).Enabled = False
        Next i

    End Sub

    '---------------------------------------------------------
    ' Exit process
    '---------------------------------------------------------
    Private Sub Button_CntExit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntExit.Click

        ' Timer stop
        CntTimer.Enabled = False

        ' Exit function execute
        Ret = CntExit(Id)

        ' Error process
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()

    End Sub

    '---------------------------------------------------------
    ' Dialog exit
    '---------------------------------------------------------
    Private Sub Button_Exit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_Exit.Click

        ' Timer stop
        CntTimer.Enabled = False

        ' Exit function execute
        Ret = CntExit(Id)

        ' Dialog exit
        End

    End Sub

    '---------------------------------------------------------
    ' Mode dialog express
    '---------------------------------------------------------
    Private Sub Button_CntMode_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntMode.Click

        ' Dialog express in modal
        Mode.DefInstance.ShowDialog()

    End Sub

    '---------------------------------------------------------
    ' Comparison dialog express
    '---------------------------------------------------------
    Private Sub Button_CntCompare_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button_CntCompare.Click

        ' Dialog express in modal
        Comp.DefInstance.ShowDialog()

    End Sub

    '---------------------------------------------------------
    ' Counter start
    '---------------------------------------------------------
    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

        ' Set parameter
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
        Next i

        ' Counter start
        Ret = CntStartCount(Id, ChNo, ChannelNum)

        ' Error process
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()
        If (Ret <> CNT_ERR_SUCCESS) Then
            Exit Sub
        End If

        ' Timer start
        CntTimer.Enabled = True

    End Sub

    '---------------------------------------------------------
    ' Counter stop
    '---------------------------------------------------------
    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

        ' Set parament
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
        Next i

        ' Counter stop
        Ret = CntStopCount(Id, ChNo, ChannelNum)

        ' Error process
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()

        ' Timer stop
        CntTimer.Enabled = False

    End Sub

    '---------------------------------------------------------
    ' Preset
    '---------------------------------------------------------
    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

        ' Get data from screen and set parament
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
            szText = Edit_Preset(i).Text
            If _Radio_Preset_0.Checked = True Then
                ' In order to set the preset value to signed, convert it once through hexadecimal characters
                PresetData(i) = Convert.ToInt32(Hex(Val(szText)), 16)
            Else
                PresetData(i) = Val("&H" & szText)
            End If
        Next i

        ' Preset
        Ret = CntPreset(Id, ChNo, ChannelNum, PresetData)

        ' Error process
        Call CntGetErrorString(Ret, szError)
        Edit_ReturnCode.Text = "Ret = " & Ret & ":" & szError.ToString()

    End Sub


    '---------------------------------------------------------
    ' Dec shift precess(Counter value)
    '---------------------------------------------------------
    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

    '---------------------------------------------------------
    ' Hex shift precess(Counter value)
    '---------------------------------------------------------
    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

    '---------------------------------------------------------
    ' Dec shift precess(Preset value)
    '---------------------------------------------------------
    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)
                ' In order to display the preset value to unsigned, convert it once through hexadecimal characters
                Edit_Preset(i).Text = CStr(Convert.ToUInt32(Hex(PresetData), 16))
            Next i
        End If
    End Sub

    '---------------------------------------------------------
    ' Hex shift precess(Preset value)
    '---------------------------------------------------------
    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
                ' In order to set the preset value to signed, convert it once through hexadecimal characters
                PresetData = Convert.ToInt32(Hex(Val(szText)), 16)
                Edit_Preset(i).Text = Hex(PresetData)
            Next i
        End If
    End Sub

    '---------------------------------------------------------
    ' Subroutine: 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

    '---------------------------------------------------------
    ' Timer process
    '---------------------------------------------------------
    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

        ' Set parameter
        For i = 0 To ChannelNum - 1
            ChNo(i) = i
            CountData(i) = 0
        Next i

        ' Get counter value
        Ret = CntReadCount(Id, ChNo, ChannelNum, CountData)

        ' Error process
        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

        ' Get status
        For i = 0 To ChannelNum - 1
            Ret = CntReadStatus(Id, i, Sts(i))

            ' Error process
            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

        ' Count data、Status data express
        bIs10 = _Radio_Ch_0.Checked
        For i = 0 To ChannelNum - 1
            If bIs10 Then
                ' In order to display the count data to unsigned, convert it once through hexadecimal characters
                szText = Str(Convert.ToUInt32(Hex(CountData(i)), 16))
            Else
                szText = Hex(CountData(i))
            End If

            Edit_Ch(i).Text = szText
            szText = Hex(Sts(i))
            Edit_Status(i).Text = szText
        Next i


    End Sub

    '---------------------------------------------------------
    ' Subroutine: Message process
    '---------------------------------------------------------
    Private Sub CountMatch(ByVal ChNo As Short, ByVal UpDown As Short, ByVal dwCount As Integer)

        Dim szUpDown As String

        ' Create screen data
        szUpDown = ""

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

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

        ' Expression
        ' In order to display the count data to unsigned, convert it once through hexadecimal characters
        Edit_CompResult.Text = "Ch : " & ChNo & " Count= " & Str(Convert.ToUInt32(Hex(dwCount), 16)) & ":" & szUpDown

    End Sub

    '---------------------------------------------------------
    ' Message Process
    '---------------------------------------------------------
    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        ' LOWORD(wParam)=ID Getted from CntInit function
        ' HIWORD(wParam)=Direction(UP=1, DOWN=2)
        ' lParam=Compare Data
        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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                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)
                ' In order to set the comparison value to signed, convert it once through hexadecimal characters
                dwCount = Convert.ToInt32(Hex(Val(m.LParam.ToString)), 16)
                Call CountMatch(ChNo, UpDown, dwCount)
        End Select

        MyBase.WndProc(m)
    End Sub

End Class