home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmEffects
- BorderStyle = 1 'Fixed Single
- Caption = "EFFECTS"
- ClientHeight = 2265
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 1545
- Icon = "frmEffects.frx":0000
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2265
- ScaleWidth = 1545
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton cmEff
- Caption = "Shrapen"
- Height = 375
- Index = 3
- Left = 210
- TabIndex = 3
- Top = 1560
- Width = 1095
- End
- Begin VB.CommandButton cmEff
- Caption = "Soften"
- Height = 375
- Index = 2
- Left = 210
- TabIndex = 2
- Top = 1110
- Width = 1095
- End
- Begin VB.CommandButton cmEff
- Caption = "Invert"
- Height = 375
- Index = 1
- Left = 210
- TabIndex = 1
- Top = 660
- Width = 1095
- End
- Begin VB.CommandButton cmEff
- Caption = "Filter"
- Height = 375
- Index = 0
- Left = 210
- TabIndex = 0
- Top = 210
- Width = 1095
- End
- Attribute VB_Name = "frmEffects"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private m_ChangePalette As Boolean
- Public Property Get ChangePalette() As Boolean
- ChangePalette = m_ChangePalette
- End Property
- Private Sub cmEff_Click(Index As Integer)
- On Error GoTo SErr
- SErr: If ErrS Then Exit Sub
- Dim f As Form
- Set f = frmTest
- If Index = 0 Then
- Dim r(255) As Integer, g(255) As Integer, b(255) As Integer
- Dim n As Integer
- f.piX.Undo_Add "Filter"
- For n = 0 To 255
- r(n) = n
- g(n) = n
- Next
- f.piX.Filter r(), g(), b()
- f.piX.Undo_AddPalette
- ElseIf Index = 1 Then
- f.piX.Undo_Add "Invert"
- f.piX.Invert
- f.piX.Undo_AddPalette
- ElseIf Index = 2 Then
- f.piX.Undo_Add "Soften"
- f.piX.Soften
- m_ChangePalette = True
- ElseIf Index = 3 Then
- f.piX.Undo_Add "Sharpen"
- f.piX.Sharpen
- m_ChangePalette = True
- End If
- End Sub
- Function ErrS() As Boolean
- ErrS = False
- If Err.Number <> 0 Then
- MsgBox "Error with number: " & Format(Err.Number, "#,##0") & vbCr & vbCr & Err.Description, vbCritical, "ERROR"
- ErrS = True
- Err.Clear
- End If
- End Function
- Private Sub Form_Load()
- On Error GoTo SErr
- SErr: If ErrS Then Exit Sub
- m_ChangePalette = False
- Move frmTest.Left + frmTest.Width - Width - 500, frmTest.Top + frmTest.Height - Height - 500
- End Sub
-