home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form StatSample
- Caption = "MSStat Sample Program"
- ClientHeight = 1635
- ClientLeft = 1740
- ClientTop = 3585
- ClientWidth = 8640
- Height = 2040
- Left = 1680
- LinkTopic = "Form1"
- ScaleHeight = 1635
- ScaleWidth = 8640
- Top = 3240
- Width = 8760
- Begin VScrollBar VScroll1
- Height = 975
- Left = 1320
- Max = 100
- TabIndex = 1
- Top = 120
- Width = 255
- End
- Begin MabryStatus MSStat1
- Align = 2 'Align Bottom
- BackColor = &H00C0C0C0&
- BevelOuter = 4 'Single Line
- BevelWidth = 1
- Border = 1 'Single Width
- DefaultItem = 0
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 285
- HorzGap = 5
- ItemCount = 6
- Left = 0
- Top = 1350
- VertGap = 1
- Width = 8640
- End
- Begin Label Label2
- Caption = "Use the scroll bar to make the percentage bar go back and forth."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 975
- Left = 1680
- TabIndex = 2
- Top = 240
- Width = 1335
- End
- Begin Label Label1
- Caption = "Double click on these three elements and see the indicator lights on your keyboard change."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 855
- Left = 5880
- TabIndex = 0
- Top = 360
- Width = 2415
- End
- Option Explicit
- Sub Form_Load ()
- ' set caption property
- MSStat1.ItemLabel(0) = "Caption:"
- MSStat1.ItemCaption(0) = "This is a sample caption."
- ' status keys
- MSStat1.ItemStyle(2) = 1
- MSStat1.ItemStyle(3) = 2
- MSStat1.ItemStyle(4) = 3
- ' set to time
- MSStat1.ItemStyle(5) = 6
- MSStat1.ItemWidth(5) = 860
- MSStat1.ItemCaption(5) = "HH:NN:SS"
- ' create percentage bar
- MSStat1.ItemStyle(1) = 5
- End Sub
- Sub MSStat1_ItemDblClick (ItemIndex As Integer)
- ' change key state if needed
- Select Case ItemIndex
- Case 2:
- MSStat1.StateNumLock = Not MSStat1.StateNumLock
- Case 3:
- MSStat1.StateScrollLock = Not MSStat1.StateScrollLock
- Case 4:
- MSStat1.StateCapsLock = Not MSStat1.StateCapsLock
- End Select
- End Sub
- Sub VScroll1_Change ()
- MSStat1.ItemPercent(1) = VScroll1.Value
- End Sub
- Sub VScroll1_Scroll ()
- VScroll1_Change
- End Sub
-