home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / mastvb6.exe / Ch07 / PalColor / PalGrad.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-06-06  |  6.1 KB  |  197 lines

  1. VERSION 5.00
  2. Begin VB.Form PaletteGradientForm 
  3.    Caption         =   "256 Color Palettes"
  4.    ClientHeight    =   4365
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   7230
  8.    LinkTopic       =   "Form1"
  9.    Palette         =   "PalGrad.frx":0000
  10.    PaletteMode     =   2  'Custom
  11.    ScaleHeight     =   4365
  12.    ScaleWidth      =   7230
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.OptionButton PaletteOption 
  15.       Caption         =   "ManyColors"
  16.       BeginProperty Font 
  17.          Name            =   "Verdana"
  18.          Size            =   9
  19.          Charset         =   0
  20.          Weight          =   400
  21.          Underline       =   0   'False
  22.          Italic          =   0   'False
  23.          Strikethrough   =   0   'False
  24.       EndProperty
  25.       Height          =   225
  26.       Index           =   7
  27.       Left            =   5475
  28.       TabIndex        =   8
  29.       Top             =   3735
  30.       Width           =   1545
  31.    End
  32.    Begin VB.OptionButton PaletteOption 
  33.       Caption         =   "Monochrome"
  34.       BeginProperty Font 
  35.          Name            =   "Verdana"
  36.          Size            =   9
  37.          Charset         =   0
  38.          Weight          =   400
  39.          Underline       =   0   'False
  40.          Italic          =   0   'False
  41.          Strikethrough   =   0   'False
  42.       EndProperty
  43.       Height          =   225
  44.       Index           =   8
  45.       Left            =   5490
  46.       TabIndex        =   7
  47.       Top             =   4050
  48.       Width           =   1590
  49.    End
  50.    Begin VB.OptionButton PaletteOption 
  51.       Caption         =   "Smooth"
  52.       BeginProperty Font 
  53.          Name            =   "Verdana"
  54.          Size            =   9
  55.          Charset         =   0
  56.          Weight          =   400
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   225
  62.       Index           =   6
  63.       Left            =   3615
  64.       TabIndex        =   6
  65.       Top             =   4050
  66.       Width           =   1380
  67.    End
  68.    Begin VB.OptionButton PaletteOption 
  69.       Caption         =   "SeaSky"
  70.       BeginProperty Font 
  71.          Name            =   "Verdana"
  72.          Size            =   9
  73.          Charset         =   0
  74.          Weight          =   400
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       Height          =   225
  80.       Index           =   4
  81.       Left            =   1890
  82.       TabIndex        =   5
  83.       Top             =   4050
  84.       Width           =   1380
  85.    End
  86.    Begin VB.OptionButton PaletteOption 
  87.       Caption         =   "Neon"
  88.       BeginProperty Font 
  89.          Name            =   "Verdana"
  90.          Size            =   9
  91.          Charset         =   0
  92.          Weight          =   400
  93.          Underline       =   0   'False
  94.          Italic          =   0   'False
  95.          Strikethrough   =   0   'False
  96.       EndProperty
  97.       Height          =   225
  98.       Index           =   2
  99.       Left            =   150
  100.       TabIndex        =   4
  101.       Top             =   4050
  102.       Width           =   1410
  103.    End
  104.    Begin VB.OptionButton PaletteOption 
  105.       Caption         =   "BlueWhite"
  106.       BeginProperty Font 
  107.          Name            =   "Verdana"
  108.          Size            =   9
  109.          Charset         =   0
  110.          Weight          =   400
  111.          Underline       =   0   'False
  112.          Italic          =   0   'False
  113.          Strikethrough   =   0   'False
  114.       EndProperty
  115.       Height          =   225
  116.       Index           =   5
  117.       Left            =   3615
  118.       TabIndex        =   3
  119.       Top             =   3735
  120.       Width           =   1380
  121.    End
  122.    Begin VB.OptionButton PaletteOption 
  123.       Caption         =   "Earth"
  124.       BeginProperty Font 
  125.          Name            =   "Verdana"
  126.          Size            =   9
  127.          Charset         =   0
  128.          Weight          =   400
  129.          Underline       =   0   'False
  130.          Italic          =   0   'False
  131.          Strikethrough   =   0   'False
  132.       EndProperty
  133.       Height          =   225
  134.       Index           =   3
  135.       Left            =   1890
  136.       TabIndex        =   2
  137.       Top             =   3735
  138.       Width           =   1380
  139.    End
  140.    Begin VB.OptionButton PaletteOption 
  141.       Caption         =   "MoonLite"
  142.       BeginProperty Font 
  143.          Name            =   "Verdana"
  144.          Size            =   9
  145.          Charset         =   0
  146.          Weight          =   400
  147.          Underline       =   0   'False
  148.          Italic          =   0   'False
  149.          Strikethrough   =   0   'False
  150.       EndProperty
  151.       Height          =   225
  152.       Index           =   1
  153.       Left            =   150
  154.       TabIndex        =   1
  155.       Top             =   3735
  156.       Value           =   -1  'True
  157.       Width           =   1410
  158.    End
  159.    Begin VB.PictureBox Picture1 
  160.       DrawWidth       =   2
  161.       Height          =   3375
  162.       Left            =   150
  163.       ScaleHeight     =   221
  164.       ScaleMode       =   3  'Pixel
  165.       ScaleWidth      =   451
  166.       TabIndex        =   0
  167.       Top             =   120
  168.       Width           =   6825
  169.    End
  170. Attribute VB_Name = "PaletteGradientForm"
  171. Attribute VB_GlobalNameSpace = False
  172. Attribute VB_Creatable = False
  173. Attribute VB_PredeclaredId = True
  174. Attribute VB_Exposed = False
  175. Dim PaletteFile(10) As String
  176. Private Sub Form_Load()
  177.     PaletteFile(1) = "moonlite.dib"
  178.     PaletteFile(2) = "neon.dib"
  179.     PaletteFile(3) = "earth.dib"
  180.     PaletteFile(4) = "seasky.dib"
  181.     PaletteFile(5) = "bluewhit.dib"
  182.     PaletteFile(6) = "smooth.dib"
  183.     PaletteFile(7) = "manyclrs.dib"
  184.     PaletteFile(8) = "mono.dib"
  185.     Me.Show
  186.     DrawGradient
  187. End Sub
  188. Private Sub PaletteOption_Click(Index As Integer)
  189.     Me.Palette = LoadPicture(App.Path & "\dib\" & PaletteFile(Index))
  190.     DrawGradient
  191. End Sub
  192. Sub DrawGradient()
  193. DoEvents
  194. For i = 0 To 225
  195.     Picture1.Line (i * 2, 0)-(i * 2, Picture1.ScaleHeight), &H1000000 + 20 + i
  196. End Sub
  197.