home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Grayscale & Negative"
- ClientHeight = 2895
- ClientLeft = 1215
- ClientTop = 1995
- ClientWidth = 5415
- Height = 3585
- Left = 1155
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2895
- ScaleWidth = 5415
- Top = 1365
- Width = 5535
- Begin VB.CommandButton cmdProcessImage
- Caption = "&Process Image"
- Height = 375
- Left = 3480
- TabIndex = 2
- Top = 2400
- Width = 1815
- End
- Begin VB.Frame Frame1
- Caption = "Image Processor"
- Height = 2295
- Left = 3480
- TabIndex = 0
- Top = 0
- Width = 1815
- Begin VB.OptionButton optProcessor
- Caption = "Rotate"
- Height = 255
- Index = 4
- Left = 120
- TabIndex = 9
- Top = 1680
- Value = -1 'True
- Width = 1095
- End
- Begin VB.OptionButton optProcessor
- Caption = "Vertical Mirror"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 8
- Top = 1320
- Width = 1575
- End
- Begin VB.OptionButton optProcessor
- Caption = "Horizontal Mirror"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 7
- Top = 960
- Width = 1575
- End
- Begin VB.OptionButton optProcessor
- Caption = "Negate"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 6
- Top = 600
- Width = 1095
- End
- Begin VB.TextBox txtDegrees
- Enabled = 0 'False
- Height = 285
- Left = 1200
- TabIndex = 3
- Text = "txtDegrees"
- Top = 1920
- Width = 495
- End
- Begin VB.OptionButton optProcessor
- Caption = "Grayscale"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 1095
- End
- Begin VB.Label Label1
- Caption = "Degree:"
- Height = 255
- Left = 555
- TabIndex = 4
- Top = 1965
- Width = 615
- End
- End
- Begin ik32Lib.Picbuf Picbuf1
- Height = 2775
- Left = 120
- TabIndex = 5
- Top = 0
- Width = 3255
- _Version = 65536
- _ExtentX = 5741
- _ExtentY = 4895
- _StockProps = 253
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 2280
- Top = 1200
- _Version = 65536
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuLoad
- Caption = "&Load Image..."
- End
- Begin VB.Menu mnuSaveAs
- Caption = "&Save Image..."
- End
- Begin VB.Menu mnuSpacer
- Caption = "-"
- End
- Begin VB.Menu mnuExit
- Caption = "E&xit"
- Shortcut = ^X
- End
- End
- Begin VB.Menu mnuReload
- Caption = "&Reload"
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- 'Description: This code determines which option
- 'button has been chosen, and then performs that
- 'designated task
- Private Sub cmdProcessImage_Click()
- Select Case True
- Case optProcessor(0).Value
- Picbuf1.GrayScale
- Case optProcessor(1).Value
- Picbuf1.Negate
- Case optProcessor(2).Value
- Picbuf1.Mirror True, False
- Case optProcessor(3).Value
- Picbuf1.Mirror False, True
- Case optProcessor(4).Value
- Picbuf1.Rotate Val(txtDegrees.Text), 0
- End Select
- End Sub
- 'Description: Here we set all of presets for the
- 'picbuf
- Private Sub Form_Load()
- 'Set PicBuf properties and load images
- InitPicbuf Picbuf1, True, "squirrel.bmp"
- 'Init text box, and option button control array
- txtDegrees.Text = "0"
- optProcessor(0).Value = True
- End Sub
- 'Description: This code ends the program
- Private Sub mnuExit_Click()
- ExitProgram
- End Sub
- 'Description: This code calls a sub which uses the
- 'common dialog control to load an image into the
- 'picbuf
- Private Sub mnuLoad_Click()
- LoadImage Picbuf1, CommonDialog1
- End Sub
- 'Description: This code calls the PicbufOriginal
- 'change event, which reloads the image.Private Sub mnuReload_Click()
- Private Sub mnuReload_Click()
- Picbuf1.Load
- End Sub
- 'Description: Here we call a sub which uses the
- 'common dialog control to save an image from the
- 'picbuf
- Private Sub mnuSaveAs_Click()
- SaveImage Picbuf1, CommonDialog1
- End Sub
- 'Description: This code disables a text box if the
- 'pertaining option button is not chosen.
- Private Sub optProcessor_Click(Index As Integer)
- Select Case Index
- Case Is < 4
- txtDegrees.Enabled = False
- Case 4
- txtDegrees.Enabled = True
- End Select
- End Sub
-