home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch14 / gradient / directn.pag < prev    next >
Encoding:
Text File  |  1997-02-20  |  2.0 KB  |  70 lines

  1. VERSION 5.00
  2. Begin VB.PropertyPage Direction 
  3.    Caption         =   "Direction"
  4.    ClientHeight    =   3495
  5.    ClientLeft      =   0
  6.    ClientTop       =   0
  7.    ClientWidth     =   5925
  8.    PaletteMode     =   0  'Halftone
  9.    ScaleHeight     =   3495
  10.    ScaleWidth      =   5925
  11.    Begin VB.ComboBox cmbGradient 
  12.       BeginProperty Font 
  13.          Name            =   "MS Sans Serif"
  14.          Size            =   9.75
  15.          Charset         =   0
  16.          Weight          =   400
  17.          Underline       =   0   'False
  18.          Italic          =   0   'False
  19.          Strikethrough   =   0   'False
  20.       EndProperty
  21.       Height          =   360
  22.       Left            =   2130
  23.       TabIndex        =   1
  24.       Text            =   "Combo1"
  25.       Top             =   225
  26.       Width           =   1995
  27.    End
  28.    Begin VB.Label lblGradientDirection 
  29.       Caption         =   "GradientDirection:"
  30.       BeginProperty Font 
  31.          Name            =   "MS Sans Serif"
  32.          Size            =   9.75
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   315
  40.       Index           =   0
  41.       Left            =   210
  42.       TabIndex        =   0
  43.       Top             =   285
  44.       Width           =   1740
  45.    End
  46. End
  47. Attribute VB_Name = "Direction"
  48. Attribute VB_GlobalNameSpace = False
  49. Attribute VB_Creatable = True
  50. Attribute VB_PredeclaredId = False
  51. Attribute VB_Exposed = True
  52. Option Explicit
  53.  
  54. Private Sub cmbGradient_click()
  55.     Changed = True
  56. End Sub
  57.  
  58.  
  59. Private Sub PropertyPage_ApplyChanges()
  60.     SelectedControls(0).GradientDirection = Val(cmbGradient.Text)
  61. End Sub
  62.  
  63. Private Sub PropertyPage_SelectionChanged()
  64.     cmbGradient.Clear
  65.     cmbGradient.AddItem "0 - Horizontal"
  66.     cmbGradient.AddItem "1 - Vertical"
  67.     cmbGradient.ListIndex = SelectedControls(0).GradientDirection
  68. End Sub
  69.  
  70.