﻿Option Strict Off
Option Explicit On 
Imports System.Text

Friend Class Mode
	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 Buttom_OK As System.Windows.Forms.Button
	Public WithEvents Combo_Clr As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Mul As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Phase As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Filter As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Dir As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Source As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Zlogic As System.Windows.Forms.ComboBox
	Public WithEvents Combo_Zmode As System.Windows.Forms.ComboBox
	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 Frame1 As System.Windows.Forms.GroupBox
	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()
		Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Mode))
		Me.components = New System.ComponentModel.Container()
		Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
		Me.ToolTip1.Active = True
		Me.Button_Cancel = New System.Windows.Forms.Button
		Me.Buttom_OK = New System.Windows.Forms.Button
		Me.Frame1 = New System.Windows.Forms.GroupBox
		Me.Combo_Clr = New System.Windows.Forms.ComboBox
		Me.Combo_Mul = New System.Windows.Forms.ComboBox
		Me.Combo_Phase = New System.Windows.Forms.ComboBox
		Me.Combo_Filter = New System.Windows.Forms.ComboBox
		Me.Combo_Dir = New System.Windows.Forms.ComboBox
		Me.Combo_Source = New System.Windows.Forms.ComboBox
		Me.Combo_Zlogic = New System.Windows.Forms.ComboBox
		Me.Combo_Zmode = New System.Windows.Forms.ComboBox
		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.StartPosition = System.Windows.Forms.FormStartPosition.Manual
		Me.Text = "Set Mode"
		Me.ClientSize = New System.Drawing.Size(343, 352)
		Me.Location = New System.Drawing.Point(4, 23)
		Me.MaximizeBox = False
		Me.MinimizeBox = False
		Me.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
		Me.BackColor = System.Drawing.SystemColors.Control
		Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable
		Me.ControlBox = True
		Me.Enabled = True
		Me.KeyPreview = False
		Me.Cursor = System.Windows.Forms.Cursors.Default
		Me.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.ShowInTaskbar = True
		Me.HelpButton = False
		Me.WindowState = System.Windows.Forms.FormWindowState.Normal
		Me.Name = "Mode"
		Me.Button_Cancel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Button_Cancel.Text = "Cancel"
		Me.Button_Cancel.Size = New System.Drawing.Size(89, 20)
		Me.Button_Cancel.Location = New System.Drawing.Point(232, 320)
		Me.Button_Cancel.TabIndex = 10
		Me.Button_Cancel.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Button_Cancel.BackColor = System.Drawing.SystemColors.Control
		Me.Button_Cancel.CausesValidation = True
		Me.Button_Cancel.Enabled = True
		Me.Button_Cancel.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Button_Cancel.Cursor = System.Windows.Forms.Cursors.Default
		Me.Button_Cancel.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Button_Cancel.TabStop = True
		Me.Button_Cancel.Name = "Button_Cancel"
		Me.Buttom_OK.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Buttom_OK.Text = "OK"
		Me.Buttom_OK.Size = New System.Drawing.Size(89, 20)
		Me.Buttom_OK.Location = New System.Drawing.Point(128, 320)
		Me.Buttom_OK.TabIndex = 9
		Me.Buttom_OK.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Buttom_OK.BackColor = System.Drawing.SystemColors.Control
		Me.Buttom_OK.CausesValidation = True
		Me.Buttom_OK.Enabled = True
		Me.Buttom_OK.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Buttom_OK.Cursor = System.Windows.Forms.Cursors.Default
		Me.Buttom_OK.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Buttom_OK.TabStop = True
		Me.Buttom_OK.Name = "Buttom_OK"
		Me.Frame1.Text = "Counter Mode"
		Me.Frame1.Size = New System.Drawing.Size(313, 273)
		Me.Frame1.Location = New System.Drawing.Point(16, 8)
		Me.Frame1.TabIndex = 0
		Me.Frame1.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Frame1.BackColor = System.Drawing.SystemColors.Control
		Me.Frame1.Enabled = True
		Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame1.Visible = True
		Me.Frame1.Name = "Frame1"
		Me.Combo_Clr.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Clr.Location = New System.Drawing.Point(120, 240)
		Me.Combo_Clr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Clr.TabIndex = 8
		Me.Combo_Clr.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Clr.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Clr.CausesValidation = True
		Me.Combo_Clr.Enabled = True
		Me.Combo_Clr.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Clr.IntegralHeight = True
		Me.Combo_Clr.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Clr.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Clr.Sorted = False
		Me.Combo_Clr.TabStop = True
		Me.Combo_Clr.Visible = True
		Me.Combo_Clr.Name = "Combo_Clr"
		Me.Combo_Mul.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Mul.Location = New System.Drawing.Point(120, 211)
		Me.Combo_Mul.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Mul.TabIndex = 7
		Me.Combo_Mul.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Mul.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Mul.CausesValidation = True
		Me.Combo_Mul.Enabled = True
		Me.Combo_Mul.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Mul.IntegralHeight = True
		Me.Combo_Mul.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Mul.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Mul.Sorted = False
		Me.Combo_Mul.TabStop = True
		Me.Combo_Mul.Visible = True
		Me.Combo_Mul.Name = "Combo_Mul"
		Me.Combo_Phase.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Phase.Location = New System.Drawing.Point(120, 182)
		Me.Combo_Phase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Phase.TabIndex = 6
		Me.Combo_Phase.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Phase.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Phase.CausesValidation = True
		Me.Combo_Phase.Enabled = True
		Me.Combo_Phase.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Phase.IntegralHeight = True
		Me.Combo_Phase.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Phase.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Phase.Sorted = False
		Me.Combo_Phase.TabStop = True
		Me.Combo_Phase.Visible = True
		Me.Combo_Phase.Name = "Combo_Phase"
		Me.Combo_Filter.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Filter.Location = New System.Drawing.Point(120, 152)
		Me.Combo_Filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Filter.TabIndex = 5
		Me.Combo_Filter.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Filter.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Filter.CausesValidation = True
		Me.Combo_Filter.Enabled = True
		Me.Combo_Filter.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Filter.IntegralHeight = True
		Me.Combo_Filter.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Filter.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Filter.Sorted = False
		Me.Combo_Filter.TabStop = True
		Me.Combo_Filter.Visible = True
		Me.Combo_Filter.Name = "Combo_Filter"
		Me.Combo_Dir.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Dir.Location = New System.Drawing.Point(120, 124)
		Me.Combo_Dir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Dir.TabIndex = 4
		Me.Combo_Dir.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Dir.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Dir.CausesValidation = True
		Me.Combo_Dir.Enabled = True
		Me.Combo_Dir.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Dir.IntegralHeight = True
		Me.Combo_Dir.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Dir.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Dir.Sorted = False
		Me.Combo_Dir.TabStop = True
		Me.Combo_Dir.Visible = True
		Me.Combo_Dir.Name = "Combo_Dir"
		Me.Combo_Source.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Source.Location = New System.Drawing.Point(120, 96)
		Me.Combo_Source.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Source.TabIndex = 3
		Me.Combo_Source.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Source.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Source.CausesValidation = True
		Me.Combo_Source.Enabled = True
		Me.Combo_Source.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Source.IntegralHeight = True
		Me.Combo_Source.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Source.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Source.Sorted = False
		Me.Combo_Source.TabStop = True
		Me.Combo_Source.Visible = True
		Me.Combo_Source.Name = "Combo_Source"
		Me.Combo_Zlogic.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Zlogic.Location = New System.Drawing.Point(120, 64)
		Me.Combo_Zlogic.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Zlogic.TabIndex = 2
		Me.Combo_Zlogic.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Zlogic.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Zlogic.CausesValidation = True
		Me.Combo_Zlogic.Enabled = True
		Me.Combo_Zlogic.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Zlogic.IntegralHeight = True
		Me.Combo_Zlogic.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Zlogic.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Zlogic.Sorted = False
		Me.Combo_Zlogic.TabStop = True
		Me.Combo_Zlogic.Visible = True
		Me.Combo_Zlogic.Name = "Combo_Zlogic"
		Me.Combo_Zmode.Size = New System.Drawing.Size(161, 20)
		Me.Combo_Zmode.Location = New System.Drawing.Point(120, 32)
		Me.Combo_Zmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
		Me.Combo_Zmode.TabIndex = 1
		Me.Combo_Zmode.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Combo_Zmode.BackColor = System.Drawing.SystemColors.Window
		Me.Combo_Zmode.CausesValidation = True
		Me.Combo_Zmode.Enabled = True
		Me.Combo_Zmode.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo_Zmode.IntegralHeight = True
		Me.Combo_Zmode.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo_Zmode.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo_Zmode.Sorted = False
		Me.Combo_Zmode.TabStop = True
		Me.Combo_Zmode.Visible = True
		Me.Combo_Zmode.Name = "Combo_Zmode"
		Me.Label9.Text = "Syn clear:"
		Me.Label9.Size = New System.Drawing.Size(73, 17)
		Me.Label9.Location = New System.Drawing.Point(24, 240)
		Me.Label9.TabIndex = 19
		Me.Label9.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label9.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label9.BackColor = System.Drawing.SystemColors.Control
		Me.Label9.Enabled = True
		Me.Label9.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label9.UseMnemonic = True
		Me.Label9.Visible = True
		Me.Label9.AutoSize = False
		Me.Label9.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label9.Name = "Label9"
		Me.Label8.Text = "Multiple:"
		Me.Label8.Size = New System.Drawing.Size(65, 17)
		Me.Label8.Location = New System.Drawing.Point(24, 211)
		Me.Label8.TabIndex = 18
		Me.Label8.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label8.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label8.BackColor = System.Drawing.SystemColors.Control
		Me.Label8.Enabled = True
		Me.Label8.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label8.UseMnemonic = True
		Me.Label8.Visible = True
		Me.Label8.AutoSize = False
		Me.Label8.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label8.Name = "Label8"
		Me.Label7.Text = "Phase number:"
		Me.Label7.Size = New System.Drawing.Size(81, 17)
		Me.Label7.Location = New System.Drawing.Point(24, 184)
		Me.Label7.TabIndex = 17
		Me.Label7.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label7.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label7.BackColor = System.Drawing.SystemColors.Control
		Me.Label7.Enabled = True
		Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label7.UseMnemonic = True
		Me.Label7.Visible = True
		Me.Label7.AutoSize = False
		Me.Label7.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label7.Name = "Label7"
		Me.Label6.Text = "Digital Filter:"
		Me.Label6.Size = New System.Drawing.Size(89, 17)
		Me.Label6.Location = New System.Drawing.Point(24, 152)
		Me.Label6.TabIndex = 16
		Me.Label6.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label6.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label6.BackColor = System.Drawing.SystemColors.Control
		Me.Label6.Enabled = True
		Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label6.UseMnemonic = True
		Me.Label6.Visible = True
		Me.Label6.AutoSize = False
		Me.Label6.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label6.Name = "Label6"
		Me.Label5.Text = "Direction:"
		Me.Label5.Size = New System.Drawing.Size(89, 17)
		Me.Label5.Location = New System.Drawing.Point(24, 123)
		Me.Label5.TabIndex = 15
		Me.Label5.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label5.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label5.BackColor = System.Drawing.SystemColors.Control
		Me.Label5.Enabled = True
		Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label5.UseMnemonic = True
		Me.Label5.Visible = True
		Me.Label5.AutoSize = False
		Me.Label5.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label5.Name = "Label5"
		Me.Label4.Text = "Signal Source:"
		Me.Label4.Size = New System.Drawing.Size(89, 17)
		Me.Label4.Location = New System.Drawing.Point(24, 96)
		Me.Label4.TabIndex = 14
		Me.Label4.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label4.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label4.BackColor = System.Drawing.SystemColors.Control
		Me.Label4.Enabled = True
		Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label4.UseMnemonic = True
		Me.Label4.Visible = True
		Me.Label4.AutoSize = False
		Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label4.Name = "Label4"
		Me.Label3.Text = "Z Phase Logic:"
		Me.Label3.Size = New System.Drawing.Size(81, 17)
		Me.Label3.Location = New System.Drawing.Point(24, 64)
		Me.Label3.TabIndex = 13
		Me.Label3.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label3.BackColor = System.Drawing.SystemColors.Control
		Me.Label3.Enabled = True
		Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label3.UseMnemonic = True
		Me.Label3.Visible = True
		Me.Label3.AutoSize = False
		Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label3.Name = "Label3"
		Me.Label2.Text = "Z Phase Mode:"
		Me.Label2.Size = New System.Drawing.Size(89, 17)
		Me.Label2.Location = New System.Drawing.Point(24, 32)
		Me.Label2.TabIndex = 12
		Me.Label2.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label2.BackColor = System.Drawing.SystemColors.Control
		Me.Label2.Enabled = True
		Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label2.UseMnemonic = True
		Me.Label2.Visible = True
		Me.Label2.AutoSize = False
		Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label2.Name = "Label2"
		Me.Label1.Text = "Note: All channel same mode."
		Me.Label1.Size = New System.Drawing.Size(225, 17)
		Me.Label1.Location = New System.Drawing.Point(16, 288)
		Me.Label1.TabIndex = 11
		Me.Label1.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label1.BackColor = System.Drawing.SystemColors.Control
		Me.Label1.Enabled = True
		Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label1.UseMnemonic = True
		Me.Label1.Visible = True
		Me.Label1.AutoSize = False
		Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label1.Name = "Label1"
		Me.Controls.Add(Button_Cancel)
		Me.Controls.Add(Buttom_OK)
		Me.Controls.Add(Frame1)
		Me.Controls.Add(Label1)
		Me.Frame1.Controls.Add(Combo_Clr)
		Me.Frame1.Controls.Add(Combo_Mul)
		Me.Frame1.Controls.Add(Combo_Phase)
		Me.Frame1.Controls.Add(Combo_Filter)
		Me.Frame1.Controls.Add(Combo_Dir)
		Me.Frame1.Controls.Add(Combo_Source)
		Me.Frame1.Controls.Add(Combo_Zlogic)
		Me.Frame1.Controls.Add(Combo_Zmode)
		Me.Frame1.Controls.Add(Label9)
		Me.Frame1.Controls.Add(Label8)
		Me.Frame1.Controls.Add(Label7)
		Me.Frame1.Controls.Add(Label6)
		Me.Frame1.Controls.Add(Label5)
		Me.Frame1.Controls.Add(Label4)
		Me.Frame1.Controls.Add(Label3)
		Me.Frame1.Controls.Add(Label2)
	End Sub
#End Region 
#Region "Upgrade Support "
	Private Shared m_vb6FormDefInstance As Mode
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As Mode
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New Mode()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
	Dim Ret As Integer ' Return code
    Dim szError As New StringBuilder("", 256) ' Error string
	Dim szReturnCode As String ' Error string exprocess
    Dim szText As New String("", 100) ' Temporary string
	
	Dim ChNo As Short
	Dim ZMode As Short
	Dim ZLogic As Short
	Dim SigType As Short
    Dim Dir_Renamed As Short
    Dim Phase As Short
	Dim Mul As Short
	Dim SyncClr As Short
	Dim FilterValue As Short
	
	'---------------------------------------------------------
	' Dialog initialize
	'---------------------------------------------------------
	Private Sub Mode_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
		
        Dim i As Short
        Combo_Zmode.Items.Clear()
		Combo_Zmode.Items.Add(("Not Use"))
		Combo_Zmode.Items.Add(("Next Time"))
		Combo_Zmode.Items.Add(("Every Time"))

        Combo_Zlogic.Items.Clear()
		Combo_Zlogic.Items.Add(("Positive Logic"))
		Combo_Zlogic.Items.Add(("Negative Logic"))

        Combo_Source.Items.Clear()
		Combo_Source.Items.Add(("Photo-coupler Isolation"))
		Combo_Source.Items.Add(("TTL"))
		Combo_Source.Items.Add(("Differential"))

        Combo_Dir.Items.Clear()
		Combo_Dir.Items.Add(("Down-count"))
		Combo_Dir.Items.Add(("Up-count"))

        Combo_Phase.Items.Clear()
		Combo_Phase.Items.Add(("1 Phase"))
		Combo_Phase.Items.Add(("2 Phase"))
		Combo_Phase.Items.Add(("Gate Control"))

        Combo_Mul.Items.Clear()
		Combo_Mul.Items.Add(("x1"))
		Combo_Mul.Items.Add(("x2"))
		Combo_Mul.Items.Add(("x4"))

        Combo_Clr.Items.Clear()
		Combo_Clr.Items.Add(("Asynchronous"))
		Combo_Clr.Items.Add(("Synchronous"))

        Combo_Filter.Items.Clear()
		For i = 0 To 15
			Combo_Filter.Items.Add((Hex(i)))
		Next i
		
		' Get mode
		ChNo = 0
		Call CntGetZMode(Id, ChNo, ZMode)
		Call CntGetZLogic(Id, ChNo, ZLogic)
		Call CntGetChannelSignal(Id, ChNo, SigType)
		Call CntGetCountDirection(Id, ChNo, Dir_Renamed)
		Call CntGetOperationMode(Id, ChNo, Phase, Mul, SyncClr)
		Call CntGetDigitalFilter(Id, ChNo, FilterValue)
		
		' Set mode
		Combo_Zmode.SelectedIndex = ZMode - 1
		Combo_Zlogic.SelectedIndex = ZLogic
		Combo_Source.SelectedIndex = SigType
		Combo_Dir.SelectedIndex = Dir_Renamed
		Combo_Phase.SelectedIndex = Phase
		Combo_Mul.SelectedIndex = Mul
		Combo_Clr.SelectedIndex = SyncClr
		Combo_Filter.SelectedIndex = FilterValue
		
	End Sub
	
	'---------------------------------------------------------
	' OK button
	'---------------------------------------------------------
	Private Sub Buttom_OK_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Buttom_OK.Click
		
		Dim ChNo As Short
		
		' Set mode
		For ChNo = 0 To ChannelNum - 1
			Ret = CntSetZMode(Id, ChNo, Combo_Zmode.SelectedIndex + 1)
			If (Ret <> CNT_ERR_SUCCESS) Then
				Exit For
			End If
			Ret = CntSetZLogic(Id, ChNo, Combo_Zlogic.SelectedIndex)
			If (Ret <> CNT_ERR_SUCCESS) Then
				Exit For
			End If
			Ret = CntSelectChannelSignal(Id, ChNo, Combo_Source.SelectedIndex)
			If (Ret <> CNT_ERR_SUCCESS) Then
				Exit For
			End If
			Ret = CntSetCountDirection(Id, ChNo, Combo_Dir.SelectedIndex)
			If (Ret <> CNT_ERR_SUCCESS) Then
				Exit For
			End If
            Ret = CntSetOperationMode(Id, ChNo, Combo_Phase.SelectedIndex, Combo_Mul.SelectedIndex, Combo_Clr.SelectedIndex)
			If (Ret <> CNT_ERR_SUCCESS) Then
				Exit For
			End If
			Ret = CntSetDigitalFilter(Id, ChNo, Combo_Filter.SelectedIndex)
			If (Ret <> CNT_ERR_SUCCESS) Then
				Exit For
			End If
		Next ChNo
		
		' Error process
		If (Ret <> CNT_ERR_SUCCESS) Then
			Call CntGetErrorString(Ret, szError)
            szReturnCode = "Ret = " & Ret & ":" & szError.ToString()
			MsgBox(szReturnCode, MsgBoxStyle.OKOnly, "Error")
		End If
		
		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
End Class