home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch05 / slider / slider2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-20  |  3.3 KB  |  105 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Slider Demo 2"
  5.    ClientHeight    =   1890
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4695
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   1890
  11.    ScaleWidth      =   4695
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin ComctlLib.Slider Slider1 
  14.       Height          =   495
  15.       Left            =   120
  16.       TabIndex        =   0
  17.       Top             =   540
  18.       Width           =   4275
  19.       _ExtentX        =   7541
  20.       _ExtentY        =   873
  21.       Max             =   50
  22.       SelectRange     =   -1  'True
  23.       TickFrequency   =   5
  24.    End
  25.    Begin VB.Label Label4 
  26.       Caption         =   "10"
  27.       BeginProperty Font 
  28.          Name            =   "Verdana"
  29.          Size            =   9.75
  30.          Charset         =   0
  31.          Weight          =   700
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   270
  37.       Left            =   4125
  38.       TabIndex        =   4
  39.       Top             =   1095
  40.       Width           =   300
  41.    End
  42.    Begin VB.Label Label3 
  43.       Caption         =   "5"
  44.       BeginProperty Font 
  45.          Name            =   "Verdana"
  46.          Size            =   9.75
  47.          Charset         =   0
  48.          Weight          =   700
  49.          Underline       =   0   'False
  50.          Italic          =   0   'False
  51.          Strikethrough   =   0   'False
  52.       EndProperty
  53.       Height          =   270
  54.       Left            =   2205
  55.       TabIndex        =   3
  56.       Top             =   1095
  57.       Width           =   300
  58.    End
  59.    Begin VB.Label Label2 
  60.       Caption         =   "0"
  61.       BeginProperty Font 
  62.          Name            =   "Verdana"
  63.          Size            =   9.75
  64.          Charset         =   0
  65.          Weight          =   700
  66.          Underline       =   0   'False
  67.          Italic          =   0   'False
  68.          Strikethrough   =   0   'False
  69.       EndProperty
  70.       Height          =   270
  71.       Left            =   285
  72.       TabIndex        =   2
  73.       Top             =   1095
  74.       Width           =   300
  75.    End
  76.    Begin VB.Label Label1 
  77.       Caption         =   "Length in inches = 0"
  78.       BeginProperty Font 
  79.          Name            =   "Verdana"
  80.          Size            =   9
  81.          Charset         =   0
  82.          Weight          =   400
  83.          Underline       =   0   'False
  84.          Italic          =   0   'False
  85.          Strikethrough   =   0   'False
  86.       EndProperty
  87.       Height          =   315
  88.       Left            =   270
  89.       TabIndex        =   1
  90.       Top             =   60
  91.       Width           =   2685
  92.    End
  93. Attribute VB_Name = "Form1"
  94. Attribute VB_GlobalNameSpace = False
  95. Attribute VB_Creatable = False
  96. Attribute VB_PredeclaredId = True
  97. Attribute VB_Exposed = False
  98. Option Explicit
  99. Private Sub Slider1_Change()
  100.     Label1.Caption = "Length in inches = " & Format(Slider1.Value / 5, "#.00")
  101. End Sub
  102. Private Sub Slider1_Scroll()
  103.     Label1.Caption = "Length in inches = " & Format(Slider1.Value / 5, "#.00")
  104. End Sub
  105.