home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / PVb5.0 / VB / SAMPLES / PGUIDE / PALMODE / PALETTES.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-20  |  4.5 KB  |  157 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "
  4.    ClientHeight    =   5310
  5.    ClientLeft      =   1860
  6.    ClientTop       =   1530
  7.    ClientWidth     =   6465
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   5310
  10.    ScaleWidth      =   6465
  11.    Begin VB.OptionButton Option1 
  12.       Caption         =   "
  13.  DIB)"
  14.       Height          =   375
  15.       Index           =   3
  16.       Left            =   4560
  17.       TabIndex        =   6
  18.       Top             =   240
  19.       Width           =   1600
  20.    End
  21.    Begin VB.CommandButton cmdQuit 
  22.       Cancel          =   -1  'True
  23.       Caption         =   "
  24.       Height          =   495
  25.       Left            =   5040
  26.       TabIndex        =   4
  27.       Top             =   4200
  28.       Width           =   1215
  29.    End
  30.    Begin VB.PictureBox Picture1 
  31.       AutoSize        =   -1  'True
  32.       Height          =   3855
  33.       Left            =   240
  34.       ScaleHeight     =   3795
  35.       ScaleWidth      =   4035
  36.       TabIndex        =   3
  37.       Top             =   840
  38.       Width           =   4095
  39.    End
  40.    Begin VB.OptionButton Option1 
  41.       Caption         =   "
  42.       Height          =   375
  43.       Index           =   2
  44.       Left            =   3120
  45.       TabIndex        =   2
  46.       Top             =   240
  47.       Width           =   1600
  48.    End
  49.    Begin VB.OptionButton Option1 
  50.       Caption         =   "Z-
  51.       Height          =   375
  52.       Index           =   1
  53.       Left            =   1680
  54.       TabIndex        =   1
  55.       Top             =   240
  56.       Width           =   1600
  57.    End
  58.    Begin VB.OptionButton Option1 
  59.       Caption         =   "
  60.       Height          =   375
  61.       Index           =   0
  62.       Left            =   240
  63.       TabIndex        =   0
  64.       Top             =   240
  65.       Value           =   -1  'True
  66.       Width           =   1600
  67.    End
  68.    Begin VB.Timer Timer1 
  69.       Interval        =   800
  70.       Left            =   5160
  71.       Top             =   2880
  72.    End
  73.    Begin VB.Label Label1 
  74.       Caption         =   "
  75.  256 
  76.       Height          =   255
  77.       Left            =   240
  78.       TabIndex        =   5
  79.       Top             =   4920
  80.       Width           =   6135
  81.    End
  82.    Begin VB.Image Image1 
  83.       BorderStyle     =   1  'Fixed Single
  84.       Height          =   1290
  85.       Left            =   4680
  86.       Picture         =   "Palettes.frx":0000
  87.       Stretch         =   -1  'True
  88.       Top             =   840
  89.       Width           =   1620
  90.    End
  91. Attribute VB_Name = "Form1"
  92. Attribute VB_GlobalNameSpace = False
  93. Attribute VB_Creatable = False
  94. Attribute VB_PredeclaredId = True
  95. Attribute VB_Exposed = False
  96.  PaletteMode 
  97.  Palette 
  98.   ///
  99. '// 1.0 
  100.  1996.12.10                                  ///
  101. '//                                                     ///
  102.  256 
  103. Option Explicit
  104. Dim objPic As Picture    ' 
  105.  Picture 
  106. Private Sub cmdQuit_Click()
  107.     Unload Me
  108. End Sub
  109. Private Sub Form_Load()
  110.     ' 
  111.  256 
  112.  DIB 
  113.  picture 
  114.     Set objPic = LoadPicture(App.Path & "\PASTEL.DIB")
  115. End Sub
  116. Private Sub Option1_Click(Index As Integer)
  117.     Timer1.Enabled = False
  118.     Select Case Index
  119.         Case 0
  120.             ' 
  121.             Form1.PaletteMode = vbPaletteModeHalftone
  122.         Case 1
  123.             ' 
  124.             Form1.PaletteMode = vbPaletteModeUseZOrder
  125.         Case 2
  126.             'Set Form1.Palette = Nothing
  127.             ' 
  128.  Image1 
  129.             Form1.Palette = Image1.Picture
  130.             ' 
  131.             Form1.PaletteMode = vbPaletteModeCustom
  132.         Case 3
  133.             'Set Form1.Palette = Nothing
  134.             ' 
  135.  picture 
  136.             Form1.Palette = objPic
  137.             ' 
  138.             Form1.PaletteMode = vbPaletteModeCustom
  139.     End Select
  140.     Picture1.Refresh
  141.     Timer1.Enabled = True
  142. End Sub
  143. Private Sub Timer1_Timer()
  144.     Static intC As Integer
  145.     ' 
  146.     If intC < 1 Then
  147.         Picture1 = LoadPicture(App.Path & "\BANNER.GIF")
  148.         intC = 1
  149.     ElseIf intC = 1 Then
  150.         Picture1 = LoadPicture(App.Path & "\CLOUDS.BMP")
  151.         intC = 2
  152.     Else
  153.         Picture1 = LoadPicture(App.Path & "\FOREST.JPG")
  154.         intC = 0
  155.     End If
  156. End Sub
  157.