Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic

Public Class frmMiniX
    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()
        System.Windows.Forms.Application.EnableVisualStyles()
    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 WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Public WithEvents picIsoPower_3 As System.Windows.Forms.PictureBox
    Public WithEvents picIsoPower_2 As System.Windows.Forms.PictureBox
    Public WithEvents picIsoPower_1 As System.Windows.Forms.PictureBox
    Public WithEvents picIsoPower_0 As System.Windows.Forms.PictureBox
    Public WithEvents picTube_3 As System.Windows.Forms.PictureBox
    Public WithEvents picTube_2 As System.Windows.Forms.PictureBox
    Public WithEvents picTube_1 As System.Windows.Forms.PictureBox
    Public WithEvents picTube_0 As System.Windows.Forms.PictureBox
    Public WithEvents picIsoCurve_1 As System.Windows.Forms.PictureBox
    Public WithEvents picXRayOn As System.Windows.Forms.PictureBox
    Public WithEvents tmrXRayOn As System.Windows.Forms.Timer
    Public WithEvents tmrMonitor As System.Windows.Forms.Timer
    Public WithEvents tmrInterLock As System.Windows.Forms.Timer
    Public WithEvents picInterLock_1 As System.Windows.Forms.PictureBox
    Public WithEvents picInterLock_0 As System.Windows.Forms.PictureBox
    Public WithEvents cmdSetHVandCurrent As System.Windows.Forms.Button
    Public WithEvents txtCurrent As System.Windows.Forms.TextBox
    Public WithEvents txtHv As System.Windows.Forms.TextBox
    Public WithEvents cmdExit As System.Windows.Forms.Button
    Public WithEvents cmdHvOff As System.Windows.Forms.Button
    Public WithEvents cmdHvOn As System.Windows.Forms.Button
    Public WithEvents lblWattageOutOfRange As System.Windows.Forms.Label
    Public WithEvents lbllblMonitor_1 As System.Windows.Forms.Label
    Public WithEvents lbllblMonitor_0 As System.Windows.Forms.Label
    Public WithEvents lbluA_1 As System.Windows.Forms.Label
    Public WithEvents lbluA_0 As System.Windows.Forms.Label
    Public WithEvents lblkV_1 As System.Windows.Forms.Label
    Public WithEvents lblkV_0 As System.Windows.Forms.Label
    Public WithEvents lblCurrentMonitor As System.Windows.Forms.Label
    Public WithEvents lblHvMonitor As System.Windows.Forms.Label
    Public WithEvents lblMAX_2 As System.Windows.Forms.Label
    Public WithEvents lblMAX_1 As System.Windows.Forms.Label
    Public WithEvents lblMIN_2 As System.Windows.Forms.Label
    Public WithEvents lblMIN_1 As System.Windows.Forms.Label
    Public WithEvents lblMAX_0 As System.Windows.Forms.Label
    Public WithEvents lblMIN_0 As System.Windows.Forms.Label
    Public WithEvents fraSettings As System.Windows.Forms.GroupBox
    Public WithEvents cmdSTART_MINIX_CONTROLLER As System.Windows.Forms.Button
    Public WithEvents picIsoCurve_0 As System.Windows.Forms.PictureBox
    Public WithEvents picMiniXHw As System.Windows.Forms.PictureBox
    Public WithEvents picMiniXLogo As System.Windows.Forms.PictureBox
    Public WithEvents picAmptekLogo As System.Windows.Forms.PictureBox
    Public WithEvents lblPower_mW As System.Windows.Forms.Label
    Public WithEvents lblXRayOn As System.Windows.Forms.Label
    Public WithEvents lblInterLock As System.Windows.Forms.Label
    Public WithEvents lblSerialNumber As System.Windows.Forms.Label
    Public WithEvents lblBoardTemp As System.Windows.Forms.Label
    Public WithEvents lbllblPower_mW As System.Windows.Forms.Label
    Public WithEvents lbllblBoardTemp As System.Windows.Forms.Label
    Public WithEvents lblStatus As System.Windows.Forms.Label
    Public WithEvents lblMAX As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
    Public WithEvents lblMIN As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
    Public WithEvents lblkV As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
    Public WithEvents lbllblMonitor As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
    Public WithEvents lbluA As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
    Public WithEvents picInterLock As Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray
    Public WithEvents picIsoCurve As Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray
    Public WithEvents picIsoPower As Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray
    Public WithEvents picTube As Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray
    '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
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMiniX))
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.picInterLock_1 = New System.Windows.Forms.PictureBox
        Me.picInterLock_0 = New System.Windows.Forms.PictureBox
        Me.picIsoPower_3 = New System.Windows.Forms.PictureBox
        Me.picIsoPower_2 = New System.Windows.Forms.PictureBox
        Me.picIsoPower_1 = New System.Windows.Forms.PictureBox
        Me.picIsoPower_0 = New System.Windows.Forms.PictureBox
        Me.picTube_3 = New System.Windows.Forms.PictureBox
        Me.picTube_2 = New System.Windows.Forms.PictureBox
        Me.picTube_1 = New System.Windows.Forms.PictureBox
        Me.picTube_0 = New System.Windows.Forms.PictureBox
        Me.picIsoCurve_1 = New System.Windows.Forms.PictureBox
        Me.picXRayOn = New System.Windows.Forms.PictureBox
        Me.tmrXRayOn = New System.Windows.Forms.Timer(Me.components)
        Me.tmrMonitor = New System.Windows.Forms.Timer(Me.components)
        Me.tmrInterLock = New System.Windows.Forms.Timer(Me.components)
        Me.fraSettings = New System.Windows.Forms.GroupBox
        Me.cmdSetHVandCurrent = New System.Windows.Forms.Button
        Me.txtCurrent = New System.Windows.Forms.TextBox
        Me.txtHv = New System.Windows.Forms.TextBox
        Me.cmdExit = New System.Windows.Forms.Button
        Me.cmdHvOff = New System.Windows.Forms.Button
        Me.cmdHvOn = New System.Windows.Forms.Button
        Me.lblWattageOutOfRange = New System.Windows.Forms.Label
        Me.lbllblMonitor_1 = New System.Windows.Forms.Label
        Me.lbllblMonitor_0 = New System.Windows.Forms.Label
        Me.lbluA_1 = New System.Windows.Forms.Label
        Me.lbluA_0 = New System.Windows.Forms.Label
        Me.lblkV_1 = New System.Windows.Forms.Label
        Me.lblkV_0 = New System.Windows.Forms.Label
        Me.lblCurrentMonitor = New System.Windows.Forms.Label
        Me.lblHvMonitor = New System.Windows.Forms.Label
        Me.lblMAX_2 = New System.Windows.Forms.Label
        Me.lblMAX_1 = New System.Windows.Forms.Label
        Me.lblMIN_2 = New System.Windows.Forms.Label
        Me.lblMIN_1 = New System.Windows.Forms.Label
        Me.lblMAX_0 = New System.Windows.Forms.Label
        Me.lblMIN_0 = New System.Windows.Forms.Label
        Me.cmdSTART_MINIX_CONTROLLER = New System.Windows.Forms.Button
        Me.picIsoCurve_0 = New System.Windows.Forms.PictureBox
        Me.picMiniXHw = New System.Windows.Forms.PictureBox
        Me.picMiniXLogo = New System.Windows.Forms.PictureBox
        Me.picAmptekLogo = New System.Windows.Forms.PictureBox
        Me.lblPower_mW = New System.Windows.Forms.Label
        Me.lblXRayOn = New System.Windows.Forms.Label
        Me.lblInterLock = New System.Windows.Forms.Label
        Me.lblSerialNumber = New System.Windows.Forms.Label
        Me.lblBoardTemp = New System.Windows.Forms.Label
        Me.lbllblPower_mW = New System.Windows.Forms.Label
        Me.lbllblBoardTemp = New System.Windows.Forms.Label
        Me.lblStatus = New System.Windows.Forms.Label
        Me.lblMAX = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(Me.components)
        Me.lblMIN = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(Me.components)
        Me.lblkV = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(Me.components)
        Me.lbllblMonitor = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(Me.components)
        Me.lbluA = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(Me.components)
        Me.picInterLock = New Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray(Me.components)
        Me.picIsoCurve = New Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray(Me.components)
        Me.picIsoPower = New Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray(Me.components)
        Me.picTube = New Microsoft.VisualBasic.Compatibility.VB6.PictureBoxArray(Me.components)
        Me.fraSettings.SuspendLayout()
        CType(Me.lblMAX, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.lblMIN, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.lblkV, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.lbllblMonitor, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.lbluA, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.picInterLock, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.picIsoCurve, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.picIsoPower, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.picTube, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'picInterLock_1
        '
        Me.picInterLock_1.BackColor = System.Drawing.SystemColors.Control
        Me.picInterLock_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.picInterLock_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picInterLock_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picInterLock_1.Image = CType(resources.GetObject("picInterLock_1.Image"), System.Drawing.Image)
        Me.picInterLock.SetIndex(Me.picInterLock_1, CType(1, Short))
        Me.picInterLock_1.Location = New System.Drawing.Point(392, 56)
        Me.picInterLock_1.Name = "picInterLock_1"
        Me.picInterLock_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picInterLock_1.Size = New System.Drawing.Size(32, 32)
        Me.picInterLock_1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picInterLock_1.TabIndex = 33
        Me.picInterLock_1.TabStop = False
        Me.ToolTip1.SetToolTip(Me.picInterLock_1, "INTERLOCK RESTORED")
        Me.picInterLock_1.Visible = False
        '
        'picInterLock_0
        '
        Me.picInterLock_0.BackColor = System.Drawing.SystemColors.Control
        Me.picInterLock_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.picInterLock_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picInterLock_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picInterLock_0.Image = CType(resources.GetObject("picInterLock_0.Image"), System.Drawing.Image)
        Me.picInterLock.SetIndex(Me.picInterLock_0, CType(0, Short))
        Me.picInterLock_0.Location = New System.Drawing.Point(392, 56)
        Me.picInterLock_0.Name = "picInterLock_0"
        Me.picInterLock_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picInterLock_0.Size = New System.Drawing.Size(32, 32)
        Me.picInterLock_0.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picInterLock_0.TabIndex = 32
        Me.picInterLock_0.TabStop = False
        Me.ToolTip1.SetToolTip(Me.picInterLock_0, "INTERLOCK OPEN")
        Me.picInterLock_0.Visible = False
        '
        'picIsoPower_3
        '
        Me.picIsoPower_3.BackColor = System.Drawing.SystemColors.Control
        Me.picIsoPower_3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picIsoPower_3.Cursor = System.Windows.Forms.Cursors.Default
        Me.picIsoPower_3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picIsoPower_3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picIsoPower_3.Image = CType(resources.GetObject("picIsoPower_3.Image"), System.Drawing.Image)
        Me.picIsoPower.SetIndex(Me.picIsoPower_3, CType(3, Short))
        Me.picIsoPower_3.Location = New System.Drawing.Point(656, 288)
        Me.picIsoPower_3.Name = "picIsoPower_3"
        Me.picIsoPower_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picIsoPower_3.Size = New System.Drawing.Size(176, 97)
        Me.picIsoPower_3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picIsoPower_3.TabIndex = 46
        Me.picIsoPower_3.TabStop = False
        '
        'picIsoPower_2
        '
        Me.picIsoPower_2.BackColor = System.Drawing.SystemColors.Control
        Me.picIsoPower_2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picIsoPower_2.Cursor = System.Windows.Forms.Cursors.Default
        Me.picIsoPower_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picIsoPower_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picIsoPower_2.Image = CType(resources.GetObject("picIsoPower_2.Image"), System.Drawing.Image)
        Me.picIsoPower.SetIndex(Me.picIsoPower_2, CType(2, Short))
        Me.picIsoPower_2.Location = New System.Drawing.Point(656, 192)
        Me.picIsoPower_2.Name = "picIsoPower_2"
        Me.picIsoPower_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picIsoPower_2.Size = New System.Drawing.Size(176, 97)
        Me.picIsoPower_2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picIsoPower_2.TabIndex = 45
        Me.picIsoPower_2.TabStop = False
        '
        'picIsoPower_1
        '
        Me.picIsoPower_1.BackColor = System.Drawing.SystemColors.Control
        Me.picIsoPower_1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picIsoPower_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.picIsoPower_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picIsoPower_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picIsoPower_1.Image = CType(resources.GetObject("picIsoPower_1.Image"), System.Drawing.Image)
        Me.picIsoPower.SetIndex(Me.picIsoPower_1, CType(1, Short))
        Me.picIsoPower_1.Location = New System.Drawing.Point(656, 96)
        Me.picIsoPower_1.Name = "picIsoPower_1"
        Me.picIsoPower_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picIsoPower_1.Size = New System.Drawing.Size(176, 97)
        Me.picIsoPower_1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picIsoPower_1.TabIndex = 44
        Me.picIsoPower_1.TabStop = False
        '
        'picIsoPower_0
        '
        Me.picIsoPower_0.BackColor = System.Drawing.SystemColors.Control
        Me.picIsoPower_0.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picIsoPower_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.picIsoPower_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picIsoPower_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picIsoPower_0.Image = CType(resources.GetObject("picIsoPower_0.Image"), System.Drawing.Image)
        Me.picIsoPower.SetIndex(Me.picIsoPower_0, CType(0, Short))
        Me.picIsoPower_0.Location = New System.Drawing.Point(656, 0)
        Me.picIsoPower_0.Name = "picIsoPower_0"
        Me.picIsoPower_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picIsoPower_0.Size = New System.Drawing.Size(176, 97)
        Me.picIsoPower_0.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picIsoPower_0.TabIndex = 43
        Me.picIsoPower_0.TabStop = False
        '
        'picTube_3
        '
        Me.picTube_3.BackColor = System.Drawing.SystemColors.Control
        Me.picTube_3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picTube_3.Cursor = System.Windows.Forms.Cursors.Default
        Me.picTube_3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picTube_3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picTube_3.Image = CType(resources.GetObject("picTube_3.Image"), System.Drawing.Image)
        Me.picTube.SetIndex(Me.picTube_3, CType(3, Short))
        Me.picTube_3.Location = New System.Drawing.Point(456, 288)
        Me.picTube_3.Name = "picTube_3"
        Me.picTube_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picTube_3.Size = New System.Drawing.Size(194, 97)
        Me.picTube_3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picTube_3.TabIndex = 42
        Me.picTube_3.TabStop = False
        '
        'picTube_2
        '
        Me.picTube_2.BackColor = System.Drawing.SystemColors.Control
        Me.picTube_2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picTube_2.Cursor = System.Windows.Forms.Cursors.Default
        Me.picTube_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picTube_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picTube_2.Image = CType(resources.GetObject("picTube_2.Image"), System.Drawing.Image)
        Me.picTube.SetIndex(Me.picTube_2, CType(2, Short))
        Me.picTube_2.Location = New System.Drawing.Point(456, 192)
        Me.picTube_2.Name = "picTube_2"
        Me.picTube_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picTube_2.Size = New System.Drawing.Size(194, 97)
        Me.picTube_2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picTube_2.TabIndex = 41
        Me.picTube_2.TabStop = False
        '
        'picTube_1
        '
        Me.picTube_1.BackColor = System.Drawing.SystemColors.Control
        Me.picTube_1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picTube_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.picTube_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picTube_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picTube_1.Image = CType(resources.GetObject("picTube_1.Image"), System.Drawing.Image)
        Me.picTube.SetIndex(Me.picTube_1, CType(1, Short))
        Me.picTube_1.Location = New System.Drawing.Point(456, 96)
        Me.picTube_1.Name = "picTube_1"
        Me.picTube_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picTube_1.Size = New System.Drawing.Size(194, 97)
        Me.picTube_1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picTube_1.TabIndex = 40
        Me.picTube_1.TabStop = False
        '
        'picTube_0
        '
        Me.picTube_0.BackColor = System.Drawing.SystemColors.Control
        Me.picTube_0.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.picTube_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.picTube_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picTube_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picTube_0.Image = CType(resources.GetObject("picTube_0.Image"), System.Drawing.Image)
        Me.picTube.SetIndex(Me.picTube_0, CType(0, Short))
        Me.picTube_0.Location = New System.Drawing.Point(456, 0)
        Me.picTube_0.Name = "picTube_0"
        Me.picTube_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picTube_0.Size = New System.Drawing.Size(194, 97)
        Me.picTube_0.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picTube_0.TabIndex = 39
        Me.picTube_0.TabStop = False
        '
        'picIsoCurve_1
        '
        Me.picIsoCurve_1.BackColor = System.Drawing.SystemColors.Control
        Me.picIsoCurve_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.picIsoCurve_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picIsoCurve_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picIsoCurve_1.Image = CType(resources.GetObject("picIsoCurve_1.Image"), System.Drawing.Image)
        Me.picIsoCurve.SetIndex(Me.picIsoCurve_1, CType(1, Short))
        Me.picIsoCurve_1.Location = New System.Drawing.Point(264, 256)
        Me.picIsoCurve_1.Name = "picIsoCurve_1"
        Me.picIsoCurve_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picIsoCurve_1.Size = New System.Drawing.Size(172, 93)
        Me.picIsoCurve_1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picIsoCurve_1.TabIndex = 38
        Me.picIsoCurve_1.TabStop = False
        Me.picIsoCurve_1.Visible = False
        '
        'picXRayOn
        '
        Me.picXRayOn.BackColor = System.Drawing.SystemColors.Control
        Me.picXRayOn.Cursor = System.Windows.Forms.Cursors.Default
        Me.picXRayOn.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picXRayOn.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picXRayOn.Image = CType(resources.GetObject("picXRayOn.Image"), System.Drawing.Image)
        Me.picXRayOn.Location = New System.Drawing.Point(208, 56)
        Me.picXRayOn.Name = "picXRayOn"
        Me.picXRayOn.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picXRayOn.Size = New System.Drawing.Size(32, 32)
        Me.picXRayOn.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picXRayOn.TabIndex = 36
        Me.picXRayOn.TabStop = False
        Me.picXRayOn.Visible = False
        '
        'tmrXRayOn
        '
        Me.tmrXRayOn.Interval = 1000
        '
        'tmrMonitor
        '
        Me.tmrMonitor.Interval = 1500
        '
        'tmrInterLock
        '
        Me.tmrInterLock.Interval = 4000
        '
        'fraSettings
        '
        Me.fraSettings.BackColor = System.Drawing.SystemColors.Control
        Me.fraSettings.Controls.Add(Me.cmdSetHVandCurrent)
        Me.fraSettings.Controls.Add(Me.txtCurrent)
        Me.fraSettings.Controls.Add(Me.txtHv)
        Me.fraSettings.Controls.Add(Me.cmdExit)
        Me.fraSettings.Controls.Add(Me.cmdHvOff)
        Me.fraSettings.Controls.Add(Me.cmdHvOn)
        Me.fraSettings.Controls.Add(Me.lblWattageOutOfRange)
        Me.fraSettings.Controls.Add(Me.lbllblMonitor_1)
        Me.fraSettings.Controls.Add(Me.lbllblMonitor_0)
        Me.fraSettings.Controls.Add(Me.lbluA_1)
        Me.fraSettings.Controls.Add(Me.lbluA_0)
        Me.fraSettings.Controls.Add(Me.lblkV_1)
        Me.fraSettings.Controls.Add(Me.lblkV_0)
        Me.fraSettings.Controls.Add(Me.lblCurrentMonitor)
        Me.fraSettings.Controls.Add(Me.lblHvMonitor)
        Me.fraSettings.Controls.Add(Me.lblMAX_2)
        Me.fraSettings.Controls.Add(Me.lblMAX_1)
        Me.fraSettings.Controls.Add(Me.lblMIN_2)
        Me.fraSettings.Controls.Add(Me.lblMIN_1)
        Me.fraSettings.Controls.Add(Me.lblMAX_0)
        Me.fraSettings.Controls.Add(Me.lblMIN_0)
        Me.fraSettings.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.fraSettings.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.fraSettings.ForeColor = System.Drawing.SystemColors.ControlText
        Me.fraSettings.Location = New System.Drawing.Point(8, 110)
        Me.fraSettings.Name = "fraSettings"
        Me.fraSettings.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.fraSettings.Size = New System.Drawing.Size(433, 145)
        Me.fraSettings.TabIndex = 11
        Me.fraSettings.TabStop = False
        Me.fraSettings.Text = "Set/Monitor High Voltage and Current"
        '
        'cmdSetHVandCurrent
        '
        Me.cmdSetHVandCurrent.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSetHVandCurrent.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSetHVandCurrent.Enabled = False
        Me.cmdSetHVandCurrent.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.cmdSetHVandCurrent.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdSetHVandCurrent.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSetHVandCurrent.Location = New System.Drawing.Point(24, 40)
        Me.cmdSetHVandCurrent.Name = "cmdSetHVandCurrent"
        Me.cmdSetHVandCurrent.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSetHVandCurrent.Size = New System.Drawing.Size(97, 41)
        Me.cmdSetHVandCurrent.TabIndex = 31
        Me.cmdSetHVandCurrent.Text = "Set High Voltage and Current"
        '
        'txtCurrent
        '
        Me.txtCurrent.AcceptsReturn = True
        Me.txtCurrent.AutoSize = False
        Me.txtCurrent.BackColor = System.Drawing.SystemColors.Window
        Me.txtCurrent.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtCurrent.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtCurrent.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtCurrent.Location = New System.Drawing.Point(128, 64)
        Me.txtCurrent.MaxLength = 0
        Me.txtCurrent.Name = "txtCurrent"
        Me.txtCurrent.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtCurrent.Size = New System.Drawing.Size(57, 19)
        Me.txtCurrent.TabIndex = 18
        Me.txtCurrent.Text = "15"
        '
        'txtHv
        '
        Me.txtHv.AcceptsReturn = True
        Me.txtHv.AutoSize = False
        Me.txtHv.BackColor = System.Drawing.SystemColors.Window
        Me.txtHv.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtHv.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtHv.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtHv.Location = New System.Drawing.Point(128, 40)
        Me.txtHv.MaxLength = 0
        Me.txtHv.Name = "txtHv"
        Me.txtHv.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtHv.Size = New System.Drawing.Size(57, 19)
        Me.txtHv.TabIndex = 15
        Me.txtHv.Text = "15"
        '
        'cmdExit
        '
        Me.cmdExit.BackColor = System.Drawing.SystemColors.Control
        Me.cmdExit.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdExit.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.cmdExit.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdExit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdExit.Image = CType(resources.GetObject("cmdExit.Image"), System.Drawing.Image)
        Me.cmdExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.cmdExit.Location = New System.Drawing.Point(256, 92)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdExit.Size = New System.Drawing.Size(169, 45)
        Me.cmdExit.TabIndex = 14
        Me.cmdExit.Text = "E&xit"
        '
        'cmdHvOff
        '
        Me.cmdHvOff.BackColor = System.Drawing.SystemColors.Control
        Me.cmdHvOff.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdHvOff.Enabled = False
        Me.cmdHvOff.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdHvOff.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdHvOff.Image = CType(resources.GetObject("cmdHvOff.Image"), System.Drawing.Image)
        Me.cmdHvOff.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.cmdHvOff.Location = New System.Drawing.Point(320, 12)
        Me.cmdHvOff.Name = "cmdHvOff"
        Me.cmdHvOff.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdHvOff.Size = New System.Drawing.Size(105, 36)
        Me.cmdHvOff.TabIndex = 13
        Me.cmdHvOff.Text = "HV OFF"
        Me.cmdHvOff.TextAlign = System.Drawing.ContentAlignment.MiddleRight
         '
        'cmdHvOn
        '
        Me.cmdHvOn.BackColor = System.Drawing.SystemColors.Control
        Me.cmdHvOn.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdHvOn.Enabled = False
        Me.cmdHvOn.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdHvOn.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdHvOn.Image = CType(resources.GetObject("cmdHvOn.Image"), System.Drawing.Image)
        Me.cmdHvOn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.cmdHvOn.Location = New System.Drawing.Point(320, 52)
        Me.cmdHvOn.Name = "cmdHvOn"
        Me.cmdHvOn.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdHvOn.Size = New System.Drawing.Size(105, 36)
        Me.cmdHvOn.TabIndex = 12
        Me.cmdHvOn.Text = "HV ON"
        Me.cmdHvOn.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'lblWattageOutOfRange
        '
        Me.lblWattageOutOfRange.BackColor = System.Drawing.Color.Transparent
        Me.lblWattageOutOfRange.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblWattageOutOfRange.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblWattageOutOfRange.ForeColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(128, Byte), CType(128, Byte))
        Me.lblWattageOutOfRange.Location = New System.Drawing.Point(24, 16)
        Me.lblWattageOutOfRange.Name = "lblWattageOutOfRange"
        Me.lblWattageOutOfRange.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblWattageOutOfRange.Size = New System.Drawing.Size(161, 17)
        Me.lblWattageOutOfRange.TabIndex = 35
        Me.lblWattageOutOfRange.Text = ">> Wattage Out Of Range <<"
        Me.lblWattageOutOfRange.TextAlign = System.Drawing.ContentAlignment.TopCenter
        Me.lblWattageOutOfRange.Visible = False
        '
        'lbllblMonitor_1
        '
        Me.lbllblMonitor_1.BackColor = System.Drawing.Color.Transparent
        Me.lbllblMonitor_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.lbllblMonitor_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbllblMonitor_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lbllblMonitor.SetIndex(Me.lbllblMonitor_1, CType(1, Short))
        Me.lbllblMonitor_1.Location = New System.Drawing.Point(8, 120)
        Me.lbllblMonitor_1.Name = "lbllblMonitor_1"
        Me.lbllblMonitor_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lbllblMonitor_1.Size = New System.Drawing.Size(113, 17)
        Me.lbllblMonitor_1.TabIndex = 30
        Me.lbllblMonitor_1.Text = "Current Monitor"
        Me.lbllblMonitor_1.TextAlign = System.Drawing.ContentAlignment.TopRight
        '
        'lbllblMonitor_0
        '
        Me.lbllblMonitor_0.BackColor = System.Drawing.Color.Transparent
        Me.lbllblMonitor_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.lbllblMonitor_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbllblMonitor_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lbllblMonitor.SetIndex(Me.lbllblMonitor_0, CType(0, Short))
        Me.lbllblMonitor_0.Location = New System.Drawing.Point(8, 96)
        Me.lbllblMonitor_0.Name = "lbllblMonitor_0"
        Me.lbllblMonitor_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lbllblMonitor_0.Size = New System.Drawing.Size(113, 17)
        Me.lbllblMonitor_0.TabIndex = 29
        Me.lbllblMonitor_0.Text = "High Voltage Monitor"
        Me.lbllblMonitor_0.TextAlign = System.Drawing.ContentAlignment.TopRight
        '
        'lbluA_1
        '
        Me.lbluA_1.BackColor = System.Drawing.Color.Transparent
        Me.lbluA_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.lbluA_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbluA_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lbluA.SetIndex(Me.lbluA_1, CType(1, Short))
        Me.lbluA_1.Location = New System.Drawing.Point(192, 120)
        Me.lbluA_1.Name = "lbluA_1"
        Me.lbluA_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lbluA_1.Size = New System.Drawing.Size(25, 17)
        Me.lbluA_1.TabIndex = 28
        Me.lbluA_1.Text = "uA"
        Me.lbluA_1.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lbluA_0
        '
        Me.lbluA_0.BackColor = System.Drawing.Color.Transparent
        Me.lbluA_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.lbluA_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbluA_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lbluA.SetIndex(Me.lbluA_0, CType(0, Short))
        Me.lbluA_0.Location = New System.Drawing.Point(272, 64)
        Me.lbluA_0.Name = "lbluA_0"
        Me.lbluA_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lbluA_0.Size = New System.Drawing.Size(25, 17)
        Me.lbluA_0.TabIndex = 27
        Me.lbluA_0.Text = "uA"
        Me.lbluA_0.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblkV_1
        '
        Me.lblkV_1.BackColor = System.Drawing.Color.Transparent
        Me.lblkV_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblkV_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblkV_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblkV.SetIndex(Me.lblkV_1, CType(1, Short))
        Me.lblkV_1.Location = New System.Drawing.Point(192, 96)
        Me.lblkV_1.Name = "lblkV_1"
        Me.lblkV_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblkV_1.Size = New System.Drawing.Size(25, 17)
        Me.lblkV_1.TabIndex = 26
        Me.lblkV_1.Text = "kV"
        Me.lblkV_1.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblkV_0
        '
        Me.lblkV_0.BackColor = System.Drawing.Color.Transparent
        Me.lblkV_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblkV_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblkV_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblkV.SetIndex(Me.lblkV_0, CType(0, Short))
        Me.lblkV_0.Location = New System.Drawing.Point(272, 40)
        Me.lblkV_0.Name = "lblkV_0"
        Me.lblkV_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblkV_0.Size = New System.Drawing.Size(25, 17)
        Me.lblkV_0.TabIndex = 25
        Me.lblkV_0.Text = "kV"
        Me.lblkV_0.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblCurrentMonitor
        '
        Me.lblCurrentMonitor.BackColor = System.Drawing.SystemColors.Control
        Me.lblCurrentMonitor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.lblCurrentMonitor.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblCurrentMonitor.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblCurrentMonitor.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblCurrentMonitor.Location = New System.Drawing.Point(128, 120)
        Me.lblCurrentMonitor.Name = "lblCurrentMonitor"
        Me.lblCurrentMonitor.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblCurrentMonitor.Size = New System.Drawing.Size(57, 17)
        Me.lblCurrentMonitor.TabIndex = 24
        Me.lblCurrentMonitor.Text = "0.0"
        '
        'lblHvMonitor
        '
        Me.lblHvMonitor.BackColor = System.Drawing.SystemColors.Control
        Me.lblHvMonitor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.lblHvMonitor.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblHvMonitor.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblHvMonitor.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblHvMonitor.Location = New System.Drawing.Point(128, 96)
        Me.lblHvMonitor.Name = "lblHvMonitor"
        Me.lblHvMonitor.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblHvMonitor.Size = New System.Drawing.Size(57, 17)
        Me.lblHvMonitor.TabIndex = 23
        Me.lblHvMonitor.Text = "0.0"
        '
        'lblMAX_2
        '
        Me.lblMAX_2.BackColor = System.Drawing.Color.Transparent
        Me.lblMAX_2.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblMAX_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblMAX_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblMAX.SetIndex(Me.lblMAX_2, CType(2, Short))
        Me.lblMAX_2.Location = New System.Drawing.Point(232, 64)
        Me.lblMAX_2.Name = "lblMAX_2"
        Me.lblMAX_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblMAX_2.Size = New System.Drawing.Size(33, 17)
        Me.lblMAX_2.TabIndex = 22
        Me.lblMAX_2.Text = "200"
        Me.lblMAX_2.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblMAX_1
        '
        Me.lblMAX_1.BackColor = System.Drawing.Color.Transparent
        Me.lblMAX_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblMAX_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblMAX_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblMAX.SetIndex(Me.lblMAX_1, CType(1, Short))
        Me.lblMAX_1.Location = New System.Drawing.Point(232, 40)
        Me.lblMAX_1.Name = "lblMAX_1"
        Me.lblMAX_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblMAX_1.Size = New System.Drawing.Size(33, 17)
        Me.lblMAX_1.TabIndex = 21
        Me.lblMAX_1.Text = "40"
        Me.lblMAX_1.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblMIN_2
        '
        Me.lblMIN_2.BackColor = System.Drawing.Color.Transparent
        Me.lblMIN_2.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblMIN_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblMIN_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblMIN.SetIndex(Me.lblMIN_2, CType(2, Short))
        Me.lblMIN_2.Location = New System.Drawing.Point(192, 64)
        Me.lblMIN_2.Name = "lblMIN_2"
        Me.lblMIN_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblMIN_2.Size = New System.Drawing.Size(33, 17)
        Me.lblMIN_2.TabIndex = 20
        Me.lblMIN_2.Text = "5"
        Me.lblMIN_2.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblMIN_1
        '
        Me.lblMIN_1.BackColor = System.Drawing.Color.Transparent
        Me.lblMIN_1.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblMIN_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblMIN_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblMIN.SetIndex(Me.lblMIN_1, CType(1, Short))
        Me.lblMIN_1.Location = New System.Drawing.Point(192, 40)
        Me.lblMIN_1.Name = "lblMIN_1"
        Me.lblMIN_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblMIN_1.Size = New System.Drawing.Size(33, 17)
        Me.lblMIN_1.TabIndex = 19
        Me.lblMIN_1.Text = "10"
        Me.lblMIN_1.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblMAX_0
        '
        Me.lblMAX_0.BackColor = System.Drawing.Color.Transparent
        Me.lblMAX_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblMAX_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblMAX_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblMAX.SetIndex(Me.lblMAX_0, CType(0, Short))
        Me.lblMAX_0.Location = New System.Drawing.Point(232, 16)
        Me.lblMAX_0.Name = "lblMAX_0"
        Me.lblMAX_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblMAX_0.Size = New System.Drawing.Size(33, 17)
        Me.lblMAX_0.TabIndex = 17
        Me.lblMAX_0.Text = "MAX"
        Me.lblMAX_0.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblMIN_0
        '
        Me.lblMIN_0.BackColor = System.Drawing.Color.Transparent
        Me.lblMIN_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblMIN_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblMIN_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblMIN.SetIndex(Me.lblMIN_0, CType(0, Short))
        Me.lblMIN_0.Location = New System.Drawing.Point(192, 16)
        Me.lblMIN_0.Name = "lblMIN_0"
        Me.lblMIN_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblMIN_0.Size = New System.Drawing.Size(33, 17)
        Me.lblMIN_0.TabIndex = 16
        Me.lblMIN_0.Text = "MIN"
        Me.lblMIN_0.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'cmdSTART_MINIX_CONTROLLER
        '
        Me.cmdSTART_MINIX_CONTROLLER.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSTART_MINIX_CONTROLLER.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSTART_MINIX_CONTROLLER.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.cmdSTART_MINIX_CONTROLLER.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdSTART_MINIX_CONTROLLER.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSTART_MINIX_CONTROLLER.Location = New System.Drawing.Point(112, 8)
        Me.cmdSTART_MINIX_CONTROLLER.Name = "cmdSTART_MINIX_CONTROLLER"
        Me.cmdSTART_MINIX_CONTROLLER.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSTART_MINIX_CONTROLLER.Size = New System.Drawing.Size(217, 25)
        Me.cmdSTART_MINIX_CONTROLLER.TabIndex = 4
        Me.cmdSTART_MINIX_CONTROLLER.Text = "Start Amptek Mini-X"
        '
        'picIsoCurve_0
        '
        Me.picIsoCurve_0.BackColor = System.Drawing.SystemColors.Control
        Me.picIsoCurve_0.Cursor = System.Windows.Forms.Cursors.Default
        Me.picIsoCurve_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picIsoCurve_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picIsoCurve_0.Image = CType(resources.GetObject("picIsoCurve_0.Image"), System.Drawing.Image)
        Me.picIsoCurve.SetIndex(Me.picIsoCurve_0, CType(0, Short))
        Me.picIsoCurve_0.Location = New System.Drawing.Point(264, 256)
        Me.picIsoCurve_0.Name = "picIsoCurve_0"
        Me.picIsoCurve_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picIsoCurve_0.Size = New System.Drawing.Size(172, 93)
        Me.picIsoCurve_0.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picIsoCurve_0.TabIndex = 3
        '
        'picMiniXHw
        '
        Me.picMiniXHw.BackColor = System.Drawing.SystemColors.Control
        Me.picMiniXHw.Cursor = System.Windows.Forms.Cursors.Default
        Me.picMiniXHw.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picMiniXHw.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picMiniXHw.Image = CType(resources.GetObject("picMiniXHw.Image"), System.Drawing.Image)
        Me.picMiniXHw.Location = New System.Drawing.Point(8, 256)
        Me.picMiniXHw.Name = "picMiniXHw"
        Me.picMiniXHw.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picMiniXHw.Size = New System.Drawing.Size(190, 93)
        Me.picMiniXHw.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picMiniXHw.TabIndex = 2
        Me.picMiniXHw.TabStop = False
        '
        'picMiniXLogo
        '
        Me.picMiniXLogo.BackColor = System.Drawing.SystemColors.Control
        Me.picMiniXLogo.Cursor = System.Windows.Forms.Cursors.Default
        Me.picMiniXLogo.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picMiniXLogo.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picMiniXLogo.Image = CType(resources.GetObject("picMiniXLogo.Image"), System.Drawing.Image)
        Me.picMiniXLogo.Location = New System.Drawing.Point(344, 7)
        Me.picMiniXLogo.Name = "picMiniXLogo"
        Me.picMiniXLogo.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picMiniXLogo.Size = New System.Drawing.Size(98, 45)
        Me.picMiniXLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picMiniXLogo.TabIndex = 1
        Me.picMiniXLogo.TabStop = False
        '
        'picAmptekLogo
        '
        Me.picAmptekLogo.BackColor = System.Drawing.SystemColors.Control
        Me.picAmptekLogo.Cursor = System.Windows.Forms.Cursors.Default
        Me.picAmptekLogo.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.picAmptekLogo.ForeColor = System.Drawing.SystemColors.ControlText
        Me.picAmptekLogo.Image = CType(resources.GetObject("picAmptekLogo.Image"), System.Drawing.Image)
        Me.picAmptekLogo.Location = New System.Drawing.Point(7, 7)
        Me.picAmptekLogo.Name = "picAmptekLogo"
        Me.picAmptekLogo.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.picAmptekLogo.Size = New System.Drawing.Size(92, 45)
        Me.picAmptekLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.picAmptekLogo.TabIndex = 0
        Me.picAmptekLogo.TabStop = False
        '
        'lblPower_mW
        '
        Me.lblPower_mW.BackColor = System.Drawing.Color.White
        Me.lblPower_mW.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.lblPower_mW.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblPower_mW.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.lblPower_mW.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblPower_mW.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblPower_mW.Location = New System.Drawing.Point(208, 332)
        Me.lblPower_mW.Name = "lblPower_mW"
        Me.lblPower_mW.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblPower_mW.Size = New System.Drawing.Size(49, 17)
        Me.lblPower_mW.TabIndex = 8
        Me.lblPower_mW.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblXRayOn
        '
        Me.lblXRayOn.BackColor = System.Drawing.Color.Transparent
        Me.lblXRayOn.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblXRayOn.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblXRayOn.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblXRayOn.Location = New System.Drawing.Point(192, 92)
        Me.lblXRayOn.Name = "lblXRayOn"
        Me.lblXRayOn.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblXRayOn.Size = New System.Drawing.Size(65, 17)
        Me.lblXRayOn.TabIndex = 37
        Me.lblXRayOn.Text = "X-RAY ON"
        Me.lblXRayOn.TextAlign = System.Drawing.ContentAlignment.TopCenter
        Me.lblXRayOn.Visible = False
        '
        'lblInterLock
        '
        Me.lblInterLock.BackColor = System.Drawing.Color.Transparent
        Me.lblInterLock.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblInterLock.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblInterLock.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblInterLock.Location = New System.Drawing.Point(248, 72)
        Me.lblInterLock.Name = "lblInterLock"
        Me.lblInterLock.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblInterLock.Size = New System.Drawing.Size(137, 17)
        Me.lblInterLock.TabIndex = 34
        Me.lblInterLock.Text = "INTERLOCK RESTORED"
        Me.lblInterLock.TextAlign = System.Drawing.ContentAlignment.TopRight
        '
        'lblSerialNumber
        '
        Me.lblSerialNumber.BackColor = System.Drawing.Color.Transparent
        Me.lblSerialNumber.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblSerialNumber.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblSerialNumber.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblSerialNumber.Location = New System.Drawing.Point(112, 35)
        Me.lblSerialNumber.Name = "lblSerialNumber"
        Me.lblSerialNumber.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblSerialNumber.Size = New System.Drawing.Size(217, 17)
        Me.lblSerialNumber.TabIndex = 10
        Me.lblSerialNumber.Text = "lblSerialNumber"
        Me.lblSerialNumber.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblBoardTemp
        '
        Me.lblBoardTemp.BackColor = System.Drawing.SystemColors.Control
        Me.lblBoardTemp.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.lblBoardTemp.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblBoardTemp.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.lblBoardTemp.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblBoardTemp.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblBoardTemp.Location = New System.Drawing.Point(208, 285)
        Me.lblBoardTemp.Name = "lblBoardTemp"
        Me.lblBoardTemp.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblBoardTemp.Size = New System.Drawing.Size(49, 17)
        Me.lblBoardTemp.TabIndex = 9
        Me.lblBoardTemp.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lbllblPower_mW
        '
        Me.lbllblPower_mW.BackColor = System.Drawing.Color.Transparent
        Me.lbllblPower_mW.Cursor = System.Windows.Forms.Cursors.Default
        Me.lbllblPower_mW.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbllblPower_mW.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lbllblPower_mW.Location = New System.Drawing.Point(204, 304)
        Me.lbllblPower_mW.Name = "lbllblPower_mW"
        Me.lbllblPower_mW.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lbllblPower_mW.Size = New System.Drawing.Size(57, 27)
        Me.lbllblPower_mW.TabIndex = 7
        Me.lbllblPower_mW.Text = "Power mW"
        Me.lbllblPower_mW.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lbllblBoardTemp
        '
        Me.lbllblBoardTemp.BackColor = System.Drawing.Color.Transparent
        Me.lbllblBoardTemp.Cursor = System.Windows.Forms.Cursors.Default
        Me.lbllblBoardTemp.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbllblBoardTemp.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lbllblBoardTemp.Location = New System.Drawing.Point(208, 256)
        Me.lbllblBoardTemp.Name = "lbllblBoardTemp"
        Me.lbllblBoardTemp.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lbllblBoardTemp.Size = New System.Drawing.Size(49, 33)
        Me.lbllblBoardTemp.TabIndex = 6
        Me.lbllblBoardTemp.Text = "Board Temp.°C"
        Me.lbllblBoardTemp.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblStatus
        '
        Me.lblStatus.BackColor = System.Drawing.SystemColors.Control
        Me.lblStatus.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.lblStatus.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblStatus.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblStatus.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblStatus.Location = New System.Drawing.Point(8, 352)
        Me.lblStatus.Name = "lblStatus"
        Me.lblStatus.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblStatus.Size = New System.Drawing.Size(433, 25)
        Me.lblStatus.TabIndex = 5
        Me.lblStatus.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'frmMiniX
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.SystemColors.Control
        Me.CancelButton = Me.cmdExit
        Me.ClientSize = New System.Drawing.Size(451, 386)
        Me.Controls.Add(Me.picIsoPower_3)
        Me.Controls.Add(Me.picIsoPower_2)
        Me.Controls.Add(Me.picIsoPower_1)
        Me.Controls.Add(Me.picIsoPower_0)
        Me.Controls.Add(Me.picTube_3)
        Me.Controls.Add(Me.picTube_2)
        Me.Controls.Add(Me.picTube_1)
        Me.Controls.Add(Me.picTube_0)
        Me.Controls.Add(Me.picIsoCurve_1)
        Me.Controls.Add(Me.picXRayOn)
        Me.Controls.Add(Me.picInterLock_1)
        Me.Controls.Add(Me.picInterLock_0)
        Me.Controls.Add(Me.fraSettings)
        Me.Controls.Add(Me.cmdSTART_MINIX_CONTROLLER)
        Me.Controls.Add(Me.picIsoCurve_0)
        Me.Controls.Add(Me.picMiniXHw)
        Me.Controls.Add(Me.picMiniXLogo)
        Me.Controls.Add(Me.picAmptekLogo)
        Me.Controls.Add(Me.lblPower_mW)
        Me.Controls.Add(Me.lblXRayOn)
        Me.Controls.Add(Me.lblInterLock)
        Me.Controls.Add(Me.lblSerialNumber)
        Me.Controls.Add(Me.lblBoardTemp)
        Me.Controls.Add(Me.lbllblPower_mW)
        Me.Controls.Add(Me.lbllblBoardTemp)
        Me.Controls.Add(Me.lblStatus)
        Me.Cursor = System.Windows.Forms.Cursors.Default
        Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.KeyPreview = True
        Me.Location = New System.Drawing.Point(4, 30)
        Me.Name = "frmMiniX"
        Me.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text = "Mini-X Controller"
        Me.fraSettings.ResumeLayout(False)
        CType(Me.lblMAX, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.lblMIN, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.lblkV, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.lbllblMonitor, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.lbluA, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.picInterLock, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.picIsoCurve, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.picIsoPower, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.picTube, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub
#End Region
#Region "Upgrade Support "
    Private Shared m_vb6FormDefInstance As frmMiniX
    Private Shared m_InitializingDefInstance As Boolean
    Public Shared Property DefInstance() As frmMiniX
        Get
            If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
                m_InitializingDefInstance = True
                m_vb6FormDefInstance = New frmMiniX
                m_InitializingDefInstance = False
            End If
            DefInstance = m_vb6FormDefInstance
        End Get
        Set(ByVal Value As frmMiniX)
            m_vb6FormDefInstance = Value
        End Set
    End Property
#End Region

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)

    Private indInterlockStatus As Boolean
    Private indDisableMonitorCmds As Boolean

    Private Sub cmdExit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdExit.Click
        On Error Resume Next
        If (CBool(isMiniXDlg())) Then
            tmrMonitor.Enabled = False
            SendMiniXCommand(CByte(modMiniX.MiniX_Commands.mxcExit))
            Sleep(100)
        End If
        Me.Close()
    End Sub

    Private Sub cmdHvOff_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdHvOff.Click
        indDisableMonitorCmds = True
        cmdHvOff.Enabled = False
        If (CBool(isMiniXDlg())) Then
            SendMiniXCommand(CByte(modMiniX.MiniX_Commands.mxcHVOff))
            Sleep(100)
        End If
        indDisableMonitorCmds = False
    End Sub

    Private Sub cmdHvOn_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdHvOn.Click
        Dim msgResponse As Short
        indDisableMonitorCmds = True
        cmdHvOn.Enabled = False
        If (CBool(isMiniXDlg())) Then
            msgResponse = MsgBox("Turn X-RAY High Voltage ON?", MsgBoxStyle.YesNo + MsgBoxStyle.Question + MsgBoxStyle.SystemModal, "MiniX")
            If msgResponse = MsgBoxResult.Yes Then
                SendMiniXCommand(CByte(modMiniX.MiniX_Commands.mxcHVOn))
                Sleep(100)
            End If
        End If
        indDisableMonitorCmds = False
    End Sub

    Private Sub cmdSetHVandCurrent_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSetHVandCurrent.Click
        Dim dblValue As Double
        Dim MiniXSettings As MiniX_Settings
        indDisableMonitorCmds = True
        cmdSetHVandCurrent.Enabled = False
        cmdHvOn.Enabled = False
        cmdHvOff.Enabled = False
        If (CBool(isMiniXDlg())) Then
            dblValue = CDbl(txtHv.Text) 'sent hv value
            SetMiniXHV(dblValue)
            Sleep(100)
            dblValue = CDbl(txtCurrent.Text) 'send current value
            SetMiniXCurrent(dblValue)
            Sleep(100)
            SendMiniXCommand(CByte(modMiniX.MiniX_Commands.mxcSetHVandCurrent))
            Sleep(1000)
            ReadMiniXSettings(MiniXSettings) 'read the corrected values back
            txtHv.Text = CStr(MiniXSettings.HighVoltage_kV)
            txtCurrent.Text = CStr(MiniXSettings.Current_uA)
        End If
        indDisableMonitorCmds = False
    End Sub

    Private Sub cmdSTART_MINIX_CONTROLLER_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSTART_MINIX_CONTROLLER.Click
        Dim MiniXSerialNumber As Integer
        Dim strSerialNumber As String = ""
        Dim MxDeviceType As Integer

        '==== MiniXSerialNumber >= 10000 and < 1118880 40kV Tube ====
        '==== MiniXSerialNumber >= 1118880 50kV Tube ====
        picIsoCurve(0).Visible = True
        picIsoCurve(1).Visible = False
        picMiniXHw.Visible = True
        lblMAX(1).Text = "40"

        indDisableMonitorCmds = True
        cmdSTART_MINIX_CONTROLLER.Enabled = False
        If (CBool(isMiniXDlg())) Then
            SendMiniXCommand(CByte(modMiniX.MiniX_Commands.mxcStartMiniX))
            Sleep(100)
            tmrMonitor.Enabled = True
        End If
        If (CBool(isMiniXDlg())) Then
            Sleep(100)
            MiniXSerialNumber = ReadMiniXSerialNumber()
            If (MiniXSerialNumber > 0) Then
                strSerialNumber = VB6.Format(MiniXSerialNumber, "00000000")
                strSerialNumber = "Mini-X Serial Number " & strSerialNumber
                lblSerialNumber.Text = strSerialNumber
                If (MiniXSerialNumber >= 1118880) Then '50kV Tube
                    picIsoCurve(0).Visible = False
                    picIsoCurve(1).Visible = True
                    lblMAX(1).Text = "50"
                    MxDeviceType = ReadMinixOemMxDeviceType
                    UpdateDisplayByDeviceType(MxDeviceType)
                Else 'must be old 40KV Tube
                    MxDeviceType = -1
                    UpdateDisplayByDeviceType(MxDeviceType)
                End If
            Else
                lblSerialNumber.Text = ""
            End If
        End If
        indDisableMonitorCmds = False
    End Sub

    Private Sub frmMiniX_KeyDown(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        Dim KeyCode As Short = eventArgs.KeyCode
        Dim Shift As Short = eventArgs.KeyData \ &H10000
        Dim AltDown As Boolean
        AltDown = CBool((Shift And VB6.ShiftConstants.AltMask) > 0)
        If (AltDown And (KeyCode = System.Windows.Forms.Keys.X)) Then
            cmdExit_Click(cmdExit, New System.EventArgs)
        End If
    End Sub

    Private Sub frmMiniX_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        Dim MiniXSettings As MiniX_Settings
        lblSerialNumber.Text = ""
        lblInterLock.Text = ""

        picIsoCurve(0).Visible = False
        picIsoCurve(1).Visible = False
        picMiniXHw.Visible = False

        If (Not CBool(isMiniXDlg())) Then
            OpenMiniX()
            Sleep(100)
        End If
        If (CBool(isMiniXDlg())) Then
            ReadMiniXSettings(MiniXSettings)
            txtHv.Text = CStr(MiniXSettings.HighVoltage_kV)
            txtCurrent.Text = CStr(MiniXSettings.Current_uA)
        End If
    End Sub

    Private Sub frmMiniX_Closing(ByVal eventSender As System.Object, ByVal eventArgs As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        Dim Cancel As Short = eventArgs.Cancel
        On Error Resume Next
        If (CBool(isMiniXDlg())) Then
            CloseMiniX()
            Sleep(100)
        End If
        eventArgs.Cancel = Cancel
    End Sub

    Private Sub frmMiniX_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed
        'Me.Close()
    End Sub

    Private Sub tmrInterLock_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmrInterLock.Tick
        picInterLock(0).Visible = False
        picInterLock(1).Visible = False
        lblInterLock.Text = ""
    End Sub

    Private Sub UpdateMonitor()
        Dim MiniXMonitor As MiniX_Monitor
        Dim strMonitor As String = ""
        Dim indOldInterlockStatus As Boolean

        If (CBool(isMiniXDlg())) Then
            ReadMiniXMonitor(MiniXMonitor)
            Sleep(100)
            If (MiniXMonitor.mxmRefreshed) Then 'test if the status was updated
                If (MiniXMonitor.mxmReserved = 123.456) Then 'reserved but always 123.456
                    lblHvMonitor.Text = VB6.Format(MiniXMonitor.mxmHighVoltage_kV, "0.0")
                    lblCurrentMonitor.Text = VB6.Format(MiniXMonitor.mxmCurrent_uA, "0.0")
                    lblPower_mW.Text = VB6.Format(MiniXMonitor.mxmPower_mW, "0")
                    lblBoardTemp.Text = VB6.Format(MiniXMonitor.mxmTemperatureC, "0")
                    lblStatus.Text = GetMiniXStatusString(MiniXMonitor.mxmStatusInd)
                    indOldInterlockStatus = indInterlockStatus
                    indInterlockStatus = CBool(MiniXMonitor.mxmInterLock)
                    If (indOldInterlockStatus <> indInterlockStatus) Then
                        If (indInterlockStatus) Then
                            picInterLock(0).Visible = False
                            picInterLock(1).Visible = True
                            lblInterLock.Text = ToolTip1.GetToolTip(picInterLock(1))
                            tmrInterLock.Enabled = True
                        Else
                            picInterLock(0).Visible = True
                            picInterLock(1).Visible = False
                            lblInterLock.Text = ToolTip1.GetToolTip(picInterLock(0))
                            tmrInterLock.Enabled = False
                        End If
                    End If
                    EnableMiniX_Commands(MiniXMonitor.mxmEnabledCmds)
                    If (MiniXMonitor.mxmHVOn) Then
                        If (Not tmrXRayOn.Enabled) Then tmrXRayOn.Enabled = True
                    Else
                        If (tmrXRayOn.Enabled) Then tmrXRayOn.Enabled = False
                        If (picXRayOn.Visible) Then picXRayOn.Visible = False
                        If (lblXRayOn.Visible) Then lblXRayOn.Visible = False
                    End If
                    lblWattageOutOfRange.Visible = MiniXMonitor.mxmOutOfRange
                End If
            End If
        End If

    End Sub

    Private Sub EnableMiniX_Commands(ByRef mxmEnabledCmds As Byte)
        Dim indStartMiniX As Boolean
        Dim indHVOn As Boolean
        Dim indHVOff As Boolean
        Dim indSetHVandCurrent As Boolean

        If (Not indDisableMonitorCmds) Then
            indStartMiniX = CBool(mxmEnabledCmds And modMiniX.MiniX_Commands.mxcStartMiniX)
            indHVOn = CBool(mxmEnabledCmds And modMiniX.MiniX_Commands.mxcHVOn)
            indHVOff = CBool(mxmEnabledCmds And modMiniX.MiniX_Commands.mxcHVOff)
            indSetHVandCurrent = CBool(mxmEnabledCmds And modMiniX.MiniX_Commands.mxcSetHVandCurrent)
            cmdSTART_MINIX_CONTROLLER.Enabled = indStartMiniX
            cmdHvOn.Enabled = indHVOn
            cmdHvOff.Enabled = indHVOff
            cmdSetHVandCurrent.Enabled = indSetHVandCurrent
        End If
    End Sub

    Private Sub tmrMonitor_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmrMonitor.Tick
        UpdateMonitor()
    End Sub

    Private Sub tmrXRayOn_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmrXRayOn.Tick
        lblXRayOn.Visible = True
        If (picXRayOn.Visible) Then
            picXRayOn.Visible = False
        Else
            picXRayOn.Visible = True
        End If
    End Sub

    Private Sub UpdateDisplayByDeviceType(ByRef idxMX As Integer)
        picIsoCurve(0).Visible = False
        picIsoCurve(1).Visible = True
        If (idxMX = -1) Then
            picMiniXHw.Image = picTube(3).Image
            picIsoCurve(1).Image = picIsoCurve(0).Image
            Call ReadMiniXSetup40kvMiniX(MxDevice)
        ElseIf ((idxMX >= 0) And (idxMX <= 3)) Then
            picMiniXHw.Image = picTube(idxMX).Image
            picIsoCurve(1).Image = picIsoPower(idxMX).Image
            Select Case idxMX
                Case 0:
                    Call ReadMiniXSetup70kv10W_OEM(MxDevice)
                Case 1:
                    Call ReadMiniXSetup50kv4W_OEM(MxDevice)
                Case 2:
                    Call ReadMiniXSetup50kv10W_OEM(MxDevice)
                Case 3:
                    Call ReadMiniXSetup50kvMiniX(MxDevice)
                Case Else
                    Call ReadMiniXSetup50kvMiniX(MxDevice)
            End Select
        Else
            picMiniXHw.Image = picTube(3).Image
            picIsoCurve(1).Image = picIsoCurve(3).Image
            Call ReadMiniXSetup50kvMiniX(MxDevice)
        End If
        Call ReadMiniXSetupDisplay(frmMiniX.DefInstance, MxDevice)
    End Sub
End Class
