VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.UserControl ucDIP 
   ClientHeight    =   1230
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   3000
   ScaleHeight     =   1230
   ScaleWidth      =   3000
   Begin VB.Timer tmrFlash 
      Enabled         =   0   'False
      Interval        =   500
      Left            =   2190
      Top             =   2325
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   240
      Top             =   2880
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   25
      ImageHeight     =   20
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   2
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "ucDIP.ctx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "ucDIP.ctx":0291
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   0
      Left            =   150
      Picture         =   "ucDIP.ctx":0532
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   1
      Left            =   390
      Picture         =   "ucDIP.ctx":0956
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   2
      Left            =   885
      Picture         =   "ucDIP.ctx":0D9A
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   7
      Left            =   2535
      Picture         =   "ucDIP.ctx":11BE
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   6
      Left            =   2295
      Picture         =   "ucDIP.ctx":160D
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   5
      Left            =   1830
      Picture         =   "ucDIP.ctx":1A31
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   4
      Left            =   1590
      Picture         =   "ucDIP.ctx":1E55
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgDIPType1 
      Height          =   600
      Index           =   3
      Left            =   1125
      Picture         =   "ucDIP.ctx":2278
      Top             =   300
      Width           =   240
   End
   Begin VB.Image imgType 
      Height          =   1005
      Index           =   0
      Left            =   -75
      Picture         =   "ucDIP.ctx":269F
      Stretch         =   -1  'True
      Top             =   -30
      Width           =   3015
   End
   Begin VB.Label lblWarning 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "All DIPS OFF !"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   225
      Left            =   0
      TabIndex        =   0
      Top             =   975
      Visible         =   0   'False
      Width           =   3045
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   7
      Left            =   2520
      Picture         =   "ucDIP.ctx":363E
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   6
      Left            =   2190
      Picture         =   "ucDIP.ctx":38BF
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   5
      Left            =   1830
      Picture         =   "ucDIP.ctx":3B40
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   4
      Left            =   1470
      Picture         =   "ucDIP.ctx":3DC1
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   3
      Left            =   1110
      Picture         =   "ucDIP.ctx":4042
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   2
      Left            =   750
      Picture         =   "ucDIP.ctx":42C3
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   405
      Index           =   1
      Left            =   360
      Picture         =   "ucDIP.ctx":4544
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgDIPType2 
      Height          =   420
      Index           =   0
      Left            =   15
      Picture         =   "ucDIP.ctx":47C5
      Stretch         =   -1  'True
      Top             =   525
      Width           =   375
   End
   Begin VB.Image imgType 
      Height          =   990
      Index           =   1
      Left            =   0
      Picture         =   "ucDIP.ctx":4A46
      Stretch         =   -1  'True
      Top             =   0
      Width           =   2880
   End
End
Attribute VB_Name = "ucDIP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private mnType                      As Integer
Private mnDIPS                      As Integer



Public Property Let Flash(bFlash As Boolean)

    tmrFlash.Enabled = bFlash
    
End Property


Public Sub ResetDIPS()

    Dim F                           As Integer
    
    
    ' All DIPS Off
    For F = 0 To 7
        imgDIPType1(F).Top = 285
        imgDIPType2(F).Picture = ImageList1.ListImages(1).Picture
    Next F
    
    tmrFlash.Enabled = False
    
End Sub

Public Sub SetType(nType As Integer, nDIPS As Integer)

    Dim F                           As Integer
    
    
    mnType = nType
    mnDIPS = nDIPS
    
    Select Case mnDIPS
    Case 4
        UserControl.Width = 1500
        lblWarning.Width = 1500
    
    Case Else
        UserControl.Width = 3045
        lblWarning.Width = 3045
    
    End Select
    
    Select Case nType
    Case 0
        imgType(0).Visible = False
        imgType(1).Visible = True
        For F = 0 To 7
            imgDIPType1(F).Visible = False
            If F < mnDIPS Then
                imgDIPType2(F).Visible = True
            End If
        Next F
        
    Case Else ' Colourd
        imgType(0).Visible = True
        imgType(1).Visible = False
        For F = 0 To 7
            If F < mnDIPS Then
                imgDIPType1(F).Visible = True
            End If
            imgDIPType2(F).Visible = False
        Next F
        
    End Select
End Sub


Public Sub SetValue(nDIP As Integer, bActive As Boolean)

    Select Case mnType
    Case 0
        If bActive = True Then
            imgDIPType2(nDIP).Picture = ImageList1.ListImages(2).Picture
        Else
            imgDIPType2(nDIP).Picture = ImageList1.ListImages(1).Picture
        End If
        
    Case Else ' Colourd
        If bActive = True Then
            imgDIPType1(nDIP).Top = 100
        Else
            imgDIPType1(nDIP).Top = 285
        End If
        
    End Select
    
End Sub


Private Sub tmrFlash_Timer()

    lblWarning.Visible = Not lblWarning.Visible
    
    If gbOptions(3) = False Then
        tmrFlash.Enabled = False
    End If
    
End Sub


