home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmDemo
- BorderStyle = 1 'Fixed Single
- Caption = "VBMax Liquid Crystal Display Demo"
- ClientHeight = 3270
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7815
- Height = 3675
- Icon = "Demo.frx":0000
- Left = 0
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- ScaleHeight = 218
- ScaleMode = 3 'Pixel
- ScaleWidth = 521
- Top = 0
- Width = 7935
- Begin VB.PictureBox picDate
- Height = 210
- Left = 1050
- ScaleHeight = 150
- ScaleWidth = 915
- TabIndex = 26
- Top = 3000
- Width = 975
- End
- Begin VB.PictureBox picTime
- Height = 210
- Left = 3240
- ScaleHeight = 150
- ScaleWidth = 795
- TabIndex = 25
- Top = 3000
- Width = 855
- End
- Begin VB.Timer Timer1
- Interval = 500
- Left = 4380
- Top = 600
- End
- Begin VB.CommandButton cmdName
- Caption = "E&xit"
- Height = 315
- Index = 9
- Left = 6240
- TabIndex = 24
- Top = 2880
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Cancel = -1 'True
- Caption = "&About"
- Height = 315
- Index = 8
- Left = 4860
- TabIndex = 23
- Top = 2880
- Width = 1335
- End
- Begin VB.Frame Frame5
- Caption = "More Examples"
- Height = 1815
- Left = 4740
- TabIndex = 14
- Top = 900
- Width = 2955
- Begin VB.CommandButton cmdName
- Caption = "Alarm"
- Height = 315
- Index = 4
- Left = 120
- TabIndex = 21
- Top = 1380
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "Calculator"
- Height = 315
- Index = 0
- Left = 120
- TabIndex = 15
- Top = 300
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "Countdown"
- Height = 315
- Index = 1
- Left = 120
- TabIndex = 17
- Top = 660
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "Stopwatch"
- Height = 315
- Index = 2
- Left = 120
- TabIndex = 19
- Top = 1020
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "24 Hour Clock"
- Height = 315
- Index = 3
- Left = 1500
- TabIndex = 18
- Top = 660
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "Dialer"
- Height = 315
- Index = 5
- Left = 1500
- TabIndex = 20
- Top = 1020
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "12 Hour Clock"
- Height = 315
- Index = 6
- Left = 1500
- TabIndex = 16
- Top = 300
- Width = 1335
- End
- Begin VB.CommandButton cmdName
- Caption = "LCD Array"
- Height = 315
- Index = 7
- Left = 1500
- TabIndex = 22
- Top = 1380
- Width = 1335
- End
- End
- Begin VB.Frame Frame1
- Caption = "LCD Attributes"
- Height = 1995
- Left = 120
- TabIndex = 1
- Top = 900
- Width = 4455
- Begin VB.Frame Frame4
- Caption = "Colors"
- Height = 1290
- Left = 2820
- TabIndex = 10
- Top = 240
- Width = 1455
- Begin VB.CommandButton Command7
- Caption = "BackColor"
- Height = 315
- Left = 180
- TabIndex = 12
- Top = 780
- Width = 1095
- End
- Begin VB.CommandButton Command6
- Caption = "ForeColor"
- Height = 315
- Left = 180
- TabIndex = 11
- Top = 360
- Width = 1095
- End
- End
- Begin VB.Frame Frame2
- Caption = "Size"
- Height = 1260
- Left = 180
- TabIndex = 2
- Top = 240
- Width = 915
- Begin VB.VScrollBar VScroll1
- Height = 795
- Left = 420
- Max = 15
- Min = -15
- TabIndex = 5
- Top = 305
- Width = 255
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 12
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 180
- TabIndex = 3
- Top = 270
- Width = 105
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "+"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 12
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 180
- TabIndex = 4
- Top = 840
- Width = 165
- End
- End
- Begin VB.CheckBox Check1
- Caption = "Show unlit segments"
- Height = 300
- Left = 240
- TabIndex = 13
- Top = 1620
- Value = 1 'Checked
- Width = 1875
- End
- Begin VB.Frame Frame3
- Caption = "Alignment"
- Height = 1290
- Left = 1320
- TabIndex = 6
- Top = 240
- Width = 1275
- Begin VB.OptionButton optAlign
- Caption = "Left"
- Height = 255
- Index = 0
- Left = 180
- TabIndex = 7
- Top = 300
- Width = 735
- End
- Begin VB.OptionButton optAlign
- Caption = "Right"
- Height = 255
- Index = 1
- Left = 180
- TabIndex = 8
- Top = 600
- Value = -1 'True
- Width = 735
- End
- Begin VB.OptionButton optAlign
- Caption = "Center"
- Height = 255
- Index = 2
- Left = 180
- TabIndex = 9
- Top = 900
- Width = 915
- End
- End
- End
- Begin VB.PictureBox picLCD
- Height = 435
- Left = 120
- ScaleHeight = 375
- ScaleWidth = 7515
- TabIndex = 0
- Top = 120
- Width = 7575
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "Time:"
- Height = 195
- Left = 2760
- TabIndex = 28
- Top = 3000
- Width = 390
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "Date:"
- Height = 195
- Left = 600
- TabIndex = 27
- Top = 3000
- Width = 390
- End
- Attribute VB_Name = "frmDemo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim moLCD As New clsLCD
- Dim moTime As New clsLCD
- Dim moDate As New clsLCD
- Dim mnOrigHeight As Integer
- Private Sub Form_Load()
- With moDate
- .Alignment = gnCENTER
- .ForeColor = vbGreen
- .AutoSize = gnAUTOSIZE_LCD_TO_CONTAINER
- Set .Container = picDate
- .Caption = Format$(Now, "mm-dd-yy")
- End With
- With moTime
- .BlinkColon = True
- .Alignment = gnCENTER
- .ForeColor = vbGreen
- .AutoSize = gnAUTOSIZE_LCD_TO_CONTAINER
- Set .Container = picTime
- End With
- With moLCD
- .ShowUnlitSegments = True
- .AutoSize = gnAUTOSIZE_LCD_TO_CONTAINER
- Set .Container = picLCD
- .Caption = "-123,456,789,012,345.678"
- End With
- mnOrigHeight = picLCD.Height
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Set moDate = Nothing
- Set moTime = Nothing
- Set moLCD = Nothing
- Set frmDemo = Nothing
- End
- End Sub
- Private Sub cmdName_Click(Index As Integer)
- Select Case Index
- Case 0: Calculator.Show
- Case 1: CountDown.Show
- Case 2: Stopwatch.Show
- Case 3: Clock24.Show
- Case 4: AlarmForm.Show
- Case 5: Dialer.Show
- Case 6: Clock12.Show
- Case 7: LCDArray.Show
- Case 8: moLCD.About
- Case 9: Unload Me
- End Select
- End Sub
- Private Sub Command6_Click()
- moLCD.SelectForeColor
- End Sub
- Private Sub Command7_Click()
- moLCD.SelectBackColor
- End Sub
- Private Sub optAlign_Click(Index As Integer)
- Select Case Index
- Case 0: moLCD.Alignment = gnALIGN_LEFT
- Case 1: moLCD.Alignment = gnALIGN_RIGHT
- Case 2: moLCD.Alignment = gnCENTER
- End Select
- End Sub
- Private Sub VScroll1_Change()
- picLCD.Height = mnOrigHeight + VScroll1.Value
- moLCD.Redisplay
- End Sub
- Private Sub Check1_Click()
- moLCD.ShowUnlitSegments = Not moLCD.ShowUnlitSegments
- End Sub
- Private Sub Timer1_Timer()
- moTime.Caption = Format$(Now, "h:mm A/P")
- End Sub
-