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

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H8000000A&
  5.    Caption         =   "Slider Demo"
  6.    ClientHeight    =   2790
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   5250
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   2790
  12.    ScaleWidth      =   5250
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin ComctlLib.Slider Slider1 
  15.       Height          =   435
  16.       Left            =   210
  17.       TabIndex        =   0
  18.       Top             =   900
  19.       Width           =   4740
  20.       _ExtentX        =   8361
  21.       _ExtentY        =   767
  22.       MouseIcon       =   "slider.frx":0000
  23.       LargeChange     =   1
  24.       Min             =   1
  25.       Max             =   5
  26.       SelStart        =   1
  27.       TickStyle       =   3
  28.       Value           =   1
  29.    End
  30.    Begin VB.Label Label7 
  31.       Alignment       =   2  'Center
  32.       BorderStyle     =   1  'Fixed Single
  33.       Caption         =   "Use the slider, or click on the desired setting to set the ship's speed"
  34.       BeginProperty Font 
  35.          Name            =   "MS Sans Serif"
  36.          Size            =   9.75
  37.          Charset         =   0
  38.          Weight          =   400
  39.          Underline       =   0   'False
  40.          Italic          =   0   'False
  41.          Strikethrough   =   0   'False
  42.       EndProperty
  43.       Height          =   600
  44.       Left            =   465
  45.       TabIndex        =   7
  46.       Top             =   105
  47.       Width           =   4350
  48.    End
  49.    Begin VB.Label Label6 
  50.       Alignment       =   2  'Center
  51.       Caption         =   "Are we moving yet?"
  52.       BeginProperty Font 
  53.          Name            =   "Comic Sans MS"
  54.          Size            =   14.25
  55.          Charset         =   0
  56.          Weight          =   400
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   540
  62.       Left            =   375
  63.       TabIndex        =   6
  64.       Top             =   2070
  65.       Width           =   4545
  66.    End
  67.    Begin VB.Label Label5 
  68.       BackStyle       =   0  'Transparent
  69.       Caption         =   "Speedy"
  70.       BeginProperty Font 
  71.          Name            =   "Comic Sans MS"
  72.          Size            =   11.25
  73.          Charset         =   0
  74.          Weight          =   700
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       ForeColor       =   &H00FFFFFF&
  80.       Height          =   300
  81.       Left            =   4380
  82.       TabIndex        =   5
  83.       Top             =   1410
  84.       Width           =   870
  85.    End
  86.    Begin VB.Label Label4 
  87.       BackStyle       =   0  'Transparent
  88.       Caption         =   "Fast"
  89.       BeginProperty Font 
  90.          Name            =   "Comic Sans MS"
  91.          Size            =   11.25
  92.          Charset         =   0
  93.          Weight          =   700
  94.          Underline       =   0   'False
  95.          Italic          =   0   'False
  96.          Strikethrough   =   0   'False
  97.       EndProperty
  98.       ForeColor       =   &H0000FF00&
  99.       Height          =   300
  100.       Left            =   3540
  101.       TabIndex        =   4
  102.       Top             =   1410
  103.       Width           =   525
  104.    End
  105.    Begin VB.Label Label3 
  106.       BackStyle       =   0  'Transparent
  107.       Caption         =   "Medium"
  108.       BeginProperty Font 
  109.          Name            =   "Comic Sans MS"
  110.          Size            =   11.25
  111.          Charset         =   0
  112.          Weight          =   700
  113.          Underline       =   0   'False
  114.          Italic          =   0   'False
  115.          Strikethrough   =   0   'False
  116.       EndProperty
  117.       ForeColor       =   &H00FFFF00&
  118.       Height          =   300
  119.       Left            =   2250
  120.       TabIndex        =   3
  121.       Top             =   1410
  122.       Width           =   840
  123.    End
  124.    Begin VB.Label Label2 
  125.       BackStyle       =   0  'Transparent
  126.       Caption         =   "Slow"
  127.       BeginProperty Font 
  128.          Name            =   "Comic Sans MS"
  129.          Size            =   11.25
  130.          Charset         =   0
  131.          Weight          =   700
  132.          Underline       =   0   'False
  133.          Italic          =   0   'False
  134.          Strikethrough   =   0   'False
  135.       EndProperty
  136.       ForeColor       =   &H0000FFFF&
  137.       Height          =   300
  138.       Left            =   1260
  139.       TabIndex        =   2
  140.       Top             =   1410
  141.       Width           =   525
  142.    End
  143.    Begin VB.Label Label1 
  144.       BackStyle       =   0  'Transparent
  145.       Caption         =   "Off"
  146.       BeginProperty Font 
  147.          Name            =   "Comic Sans MS"
  148.          Size            =   11.25
  149.          Charset         =   0
  150.          Weight          =   700
  151.          Underline       =   0   'False
  152.          Italic          =   0   'False
  153.          Strikethrough   =   0   'False
  154.       EndProperty
  155.       ForeColor       =   &H000000FF&
  156.       Height          =   300
  157.       Left            =   225
  158.       TabIndex        =   1
  159.       Top             =   1410
  160.       Width           =   480
  161.    End
  162. Attribute VB_Name = "Form1"
  163. Attribute VB_GlobalNameSpace = False
  164. Attribute VB_Creatable = False
  165. Attribute VB_PredeclaredId = True
  166. Attribute VB_Exposed = False
  167. Option Explicit
  168. Private Sub Label1_Click()
  169.     Slider1.Value = 1
  170. End Sub
  171. Private Sub Label2_Click()
  172.     Slider1.Value = 2
  173. End Sub
  174. Private Sub Label3_Click()
  175.     Slider1.Value = 3
  176. End Sub
  177. Private Sub Label4_Click()
  178.     Slider1.Value = 4
  179. End Sub
  180. Private Sub Label5_Click()
  181.     Slider1.Value = 5
  182. End Sub
  183. Private Sub Slider1_Change()
  184.     Select Case Slider1.Value
  185.         Case 1: Label6.Caption = "Are we moving yet?"
  186.         Case 2: Label6.Caption = "We're moving at 400 mph"
  187.         Case 3: Label6.Caption = "We're cruising at 1000 mph"
  188.         Case 4: Label6.Caption = "Warp factor 1, stand by!"
  189.         Case 5: Label6.Caption = "Warp factor 9!"
  190.     End Select
  191. End Sub
  192.