home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Begin VB.Form Form1
- Caption = "Using Palettes"
- ClientHeight = 4680
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7035
- LinkTopic = "Form1"
- ScaleHeight = 4680
- ScaleWidth = 7035
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command2
- Caption = "Load Image"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3600
- TabIndex = 6
- Top = 75
- Width = 1905
- End
- Begin VB.CommandButton Command1
- Caption = "Load Image"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 150
- TabIndex = 5
- Top = 60
- Width = 1905
- End
- Begin VB.OptionButton Palette
- Caption = "Custom"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Index = 2
- Left = 5160
- TabIndex = 4
- Top = 4110
- Width = 1365
- End
- Begin VB.OptionButton Palette
- Caption = "ZOrder"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 1
- Left = 2970
- TabIndex = 3
- Top = 4080
- Width = 1320
- End
- Begin VB.OptionButton Palette
- Caption = "HalfTone"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Index = 0
- Left = 270
- TabIndex = 2
- Top = 4080
- Value = -1 'True
- Width = 1605
- End
- Begin VB.PictureBox Picture2
- Height = 3240
- Left = 3585
- ScaleHeight = 3180
- ScaleWidth = 3240
- TabIndex = 1
- Top = 555
- Width = 3300
- End
- Begin VB.PictureBox Picture1
- Height = 3240
- Left = 150
- ScaleHeight = 3180
- ScaleWidth = 3240
- TabIndex = 0
- Top = 555
- Width = 3300
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 6480
- Top = 30
- _ExtentX = 847
- _ExtentY = 847
- FontSize = 2.54052e-29
- End
- Begin VB.Frame Frame1
- Height = 690
- Left = 105
- TabIndex = 7
- Top = 3855
- Width = 6765
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- CommonDialog1.Filter = "Images|*.BMP;*.GIF;*.JPG"
- CommonDialog1.ShowOpen
- If CommonDialog1.filename <> "" Then
- Picture1.Picture = LoadPicture(CommonDialog1.filename)
- End If
- End Sub
- Private Sub Command2_Click()
- CommonDialog1.Filter = "Images|*.BMP;*.GIF;*.JPG"
- CommonDialog1.ShowOpen
- If CommonDialog1.filename <> "" Then
- Picture2.Picture = LoadPicture(CommonDialog1.filename)
- End If
- End Sub
- Private Sub Palette_Click(Index As Integer)
- Form1.PaletteMode = Index
- Form1.Refresh
- End Sub
- Private Sub Picture1_Click()
- If Form1.PaletteMode = 1 Then
- Picture1.ZOrder 0
- Picture2.ZOrder 1
- End If
- If Form1.PaletteMode = 2 Then
- Form1.Palette = Picture1.Image
- End If
- End Sub
- Private Sub Picture2_Click()
- If Form1.PaletteMode = 1 Then
- Picture2.ZOrder 0
- Picture1.ZOrder 1
- End If
- If Form1.PaletteMode = 2 Then
- Form1.Palette = Picture2.Image
- End If
- End Sub
-