home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / mabry / msstat10 / sample / statsamp.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-04-20  |  3.3 KB  |  106 lines

  1. VERSION 2.00
  2. Begin Form StatSample 
  3.    Caption         =   "MSStat Sample Program"
  4.    ClientHeight    =   1635
  5.    ClientLeft      =   1740
  6.    ClientTop       =   3585
  7.    ClientWidth     =   8640
  8.    Height          =   2040
  9.    Left            =   1680
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1635
  12.    ScaleWidth      =   8640
  13.    Top             =   3240
  14.    Width           =   8760
  15.    Begin VScrollBar VScroll1 
  16.       Height          =   975
  17.       Left            =   1320
  18.       Max             =   100
  19.       TabIndex        =   1
  20.       Top             =   120
  21.       Width           =   255
  22.    End
  23.    Begin MabryStatus MSStat1 
  24.       Align           =   2  'Align Bottom
  25.       BackColor       =   &H00C0C0C0&
  26.       BevelOuter      =   4  'Single Line
  27.       BevelWidth      =   1
  28.       Border          =   1  'Single Width
  29.       DefaultItem     =   0
  30.       FontBold        =   0   'False
  31.       FontItalic      =   0   'False
  32.       FontName        =   "MS Sans Serif"
  33.       FontSize        =   8.25
  34.       FontStrikethru  =   0   'False
  35.       FontUnderline   =   0   'False
  36.       ForeColor       =   &H00000000&
  37.       Height          =   285
  38.       HorzGap         =   5
  39.       ItemCount       =   6
  40.       Left            =   0
  41.       Top             =   1350
  42.       VertGap         =   1
  43.       Width           =   8640
  44.    End
  45.    Begin Label Label2 
  46.       Caption         =   "Use the scroll bar to make the percentage bar go back and forth."
  47.       FontBold        =   0   'False
  48.       FontItalic      =   0   'False
  49.       FontName        =   "MS Sans Serif"
  50.       FontSize        =   8.25
  51.       FontStrikethru  =   0   'False
  52.       FontUnderline   =   0   'False
  53.       Height          =   975
  54.       Left            =   1680
  55.       TabIndex        =   2
  56.       Top             =   240
  57.       Width           =   1335
  58.    End
  59.    Begin Label Label1 
  60.       Caption         =   "Double click on these three elements and see the indicator lights on your keyboard change."
  61.       FontBold        =   0   'False
  62.       FontItalic      =   0   'False
  63.       FontName        =   "MS Sans Serif"
  64.       FontSize        =   8.25
  65.       FontStrikethru  =   0   'False
  66.       FontUnderline   =   0   'False
  67.       Height          =   855
  68.       Left            =   5880
  69.       TabIndex        =   0
  70.       Top             =   360
  71.       Width           =   2415
  72.    End
  73. Option Explicit
  74. Sub Form_Load ()
  75.     ' set caption property
  76.     MSStat1.ItemLabel(0) = "Caption:"
  77.     MSStat1.ItemCaption(0) = "This is a sample caption."
  78.     ' status keys
  79.     MSStat1.ItemStyle(2) = 1
  80.     MSStat1.ItemStyle(3) = 2
  81.     MSStat1.ItemStyle(4) = 3
  82.     ' set to time
  83.     MSStat1.ItemStyle(5) = 6
  84.     MSStat1.ItemWidth(5) = 860
  85.     MSStat1.ItemCaption(5) = "HH:NN:SS"
  86.     ' create percentage bar
  87.     MSStat1.ItemStyle(1) = 5
  88. End Sub
  89. Sub MSStat1_ItemDblClick (ItemIndex As Integer)
  90.     ' change key state if needed
  91.     Select Case ItemIndex
  92.         Case 2:
  93.             MSStat1.StateNumLock = Not MSStat1.StateNumLock
  94.         Case 3:
  95.             MSStat1.StateScrollLock = Not MSStat1.StateScrollLock
  96.         Case 4:
  97.             MSStat1.StateCapsLock = Not MSStat1.StateCapsLock
  98.     End Select
  99. End Sub
  100. Sub VScroll1_Change ()
  101.     MSStat1.ItemPercent(1) = VScroll1.Value
  102. End Sub
  103. Sub VScroll1_Scroll ()
  104.     VScroll1_Change
  105. End Sub
  106.