home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form LCDArray
- BorderStyle = 3 'Fixed Dialog
- Caption = "LCD Array - Time And Time Again"
- ClientHeight = 3885
- ClientLeft = 6570
- ClientTop = 4020
- ClientWidth = 5055
- Height = 4290
- Icon = "LCDArray.frx":0000
- Left = 6510
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3885
- ScaleWidth = 5055
- ShowInTaskbar = 0 'False
- Top = 3675
- Width = 5175
- Begin VB.CommandButton cmdForeColor
- Caption = "ForeColor"
- Height = 315
- Index = 0
- Left = 1620
- TabIndex = 18
- Top = 840
- Width = 975
- End
- Begin VB.CommandButton cmdBackColor
- Caption = "BackColor"
- Height = 315
- Index = 0
- Left = 2640
- TabIndex = 17
- Top = 840
- Width = 975
- End
- Begin VB.PictureBox picLCD
- Height = 330
- Index = 0
- Left = 1620
- ScaleHeight = 270
- ScaleWidth = 1935
- TabIndex = 16
- Top = 360
- Width = 1995
- End
- Begin VB.CommandButton cmdForeColor
- Caption = "ForeColor"
- Height = 315
- Index = 4
- Left = 2940
- TabIndex = 15
- Top = 3480
- Width = 975
- End
- Begin VB.CommandButton cmdBackColor
- Caption = "BackColor"
- Height = 315
- Index = 4
- Left = 3960
- TabIndex = 14
- Top = 3480
- Width = 975
- End
- Begin VB.CommandButton cmdForeColor
- Caption = "ForeColor"
- Height = 315
- Index = 3
- Left = 120
- TabIndex = 13
- Top = 3480
- Width = 975
- End
- Begin VB.CommandButton cmdBackColor
- Caption = "BackColor"
- Height = 315
- Index = 3
- Left = 1140
- TabIndex = 12
- Top = 3480
- Width = 975
- End
- Begin VB.CommandButton cmdForeColor
- Caption = "ForeColor"
- Height = 315
- Index = 2
- Left = 2940
- TabIndex = 11
- Top = 2160
- Width = 975
- End
- Begin VB.CommandButton cmdBackColor
- Caption = "BackColor"
- Height = 315
- Index = 2
- Left = 3960
- TabIndex = 10
- Top = 2160
- Width = 975
- End
- Begin VB.CommandButton cmdForeColor
- Caption = "ForeColor"
- Height = 315
- Index = 1
- Left = 120
- TabIndex = 9
- Top = 2160
- Width = 975
- End
- Begin VB.CommandButton cmdBackColor
- Caption = "BackColor"
- Height = 315
- Index = 1
- Left = 1140
- TabIndex = 8
- Top = 2160
- Width = 975
- End
- Begin VB.Timer Timer1
- Interval = 500
- Left = 360
- Top = 300
- End
- Begin VB.PictureBox picLCD
- Height = 330
- Index = 4
- Left = 2940
- ScaleHeight = 270
- ScaleWidth = 1935
- TabIndex = 3
- Top = 3000
- Width = 1995
- End
- Begin VB.PictureBox picLCD
- Height = 330
- Index = 3
- Left = 120
- ScaleHeight = 270
- ScaleWidth = 1935
- TabIndex = 2
- Top = 3000
- Width = 1995
- End
- Begin VB.PictureBox picLCD
- Height = 330
- Index = 2
- Left = 2940
- ScaleHeight = 270
- ScaleWidth = 1935
- TabIndex = 1
- Top = 1680
- Width = 1995
- End
- Begin VB.PictureBox picLCD
- Height = 330
- Index = 1
- Left = 120
- ScaleHeight = 270
- ScaleWidth = 1935
- TabIndex = 0
- Top = 1680
- Width = 1995
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "Washington DC"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Left = 1620
- TabIndex = 19
- Top = 120
- Width = 1995
- End
- Begin VB.Label Label5
- Alignment = 2 'Center
- Caption = "Mexico City"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 195
- Left = 2940
- TabIndex = 7
- Top = 2760
- Width = 1995
- End
- Begin VB.Label Label4
- Alignment = 2 'Center
- Caption = "Tokyo"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Left = 120
- TabIndex = 6
- Top = 2760
- Width = 1995
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "Madrid"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 195
- Left = 2940
- TabIndex = 5
- Top = 1440
- Width = 1995
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Caption = "London"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 195
- Left = 120
- TabIndex = 4
- Top = 1440
- Width = 1995
- End
- Attribute VB_Name = "LCDArray"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim moLCD(4) As New clsLCD
- Private Sub Form_Load()
- Dim i As Integer
- Screen.MousePointer = vbHourglass
- For i = 0 To 4
- With moLCD(i)
- .Alignment = gnCENTER
- .BackColor = &H8000&
- .ForeColor = vbWhite
- Set .Container = picLCD(i)
- End With
- Next i
- moLCD(0).BlinkColon = True
- Timer1_Timer
- Screen.MousePointer = vbDefault
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Dim i As Integer
- For i = 0 To 4
- Set moLCD(i) = Nothing
- Next i
- Set LCDArray = Nothing
- End Sub
- Private Static Sub Timer1_Timer()
- Dim vTime As Variant
- vTime = Time()
- moLCD(0).Caption = CalcTime(vTime, 0)
- moLCD(1).Caption = CalcTime(vTime, 5)
- moLCD(2).Caption = CalcTime(vTime, 6)
- moLCD(3).Caption = CalcTime(vTime, 14)
- moLCD(4).Caption = CalcTime(vTime, -1)
- End Sub
- Private Function CalcTime(rvTime As Variant, rnHoursDifference As Integer) As String
- CalcTime = Format$(DateAdd("h", rnHoursDifference, rvTime), "h:mm A/P")
- End Function
- Private Sub cmdForeColor_Click(Index As Integer)
- moLCD(Index).SelectForeColor
- End Sub
- Private Sub cmdBackColor_Click(Index As Integer)
- moLCD(Index).SelectBackColor
- End Sub
-