home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Assign"
- ClientHeight = 4590
- ClientLeft = 1170
- ClientTop = 2400
- ClientWidth = 8055
- Height = 5280
- Left = 1110
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4590
- ScaleWidth = 8055
- Top = 1770
- Width = 8175
- Begin VB.Frame Frame2
- Caption = "Destination Picbuf Selection"
- Height = 615
- Left = 4080
- TabIndex = 11
- Top = 3240
- Width = 2415
- Begin VB.OptionButton OptDestSel
- Caption = "Selection"
- Height = 255
- Left = 1320
- TabIndex = 7
- Top = 240
- Width = 975
- End
- Begin VB.OptionButton OptDestFull
- Caption = "Full Image"
- Height = 255
- Left = 120
- TabIndex = 6
- Top = 240
- Width = 1455
- End
- End
- Begin VB.Frame Frame1
- Caption = "Source Picbuf Selection"
- Height = 615
- Left = 120
- TabIndex = 10
- Top = 3240
- Width = 2415
- Begin VB.OptionButton OptSrcSel
- Caption = "Selection"
- Height = 255
- Left = 1320
- TabIndex = 5
- Top = 240
- Width = 975
- End
- Begin VB.OptionButton OptSrcFull
- Caption = "Full Image"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 240
- Width = 1455
- End
- End
- Begin VB.ComboBox CmbResizeMode
- Height = 315
- Left = 4080
- TabIndex = 3
- Text = "cmbResizeMode"
- Top = 4200
- Width = 3855
- End
- Begin VB.ComboBox CmbAssignMode
- Height = 315
- Left = 120
- TabIndex = 2
- Text = "cmbAssignMode"
- Top = 4200
- Width = 3855
- End
- Begin VB.CommandButton CmdSrcToDestAssign
- Caption = "Assign To &Destination"
- Height = 495
- Left = 2640
- TabIndex = 0
- Top = 3360
- Width = 1335
- End
- Begin VB.CommandButton CmdDestToSrcAssign
- Caption = "Assign To &Source"
- Height = 495
- Left = 6600
- TabIndex = 1
- Top = 3360
- Width = 1335
- End
- Begin ik32Lib.Picbuf PicbufDest
- Height = 2895
- Left = 4080
- TabIndex = 9
- TabStop = 0 'False
- Top = 240
- Width = 3855
- _Version = 65536
- _ExtentX = 6800
- _ExtentY = 5106
- _StockProps = 253
- End
- Begin ik32Lib.Picbuf PicbufSrc
- Height = 2895
- Left = 120
- TabIndex = 8
- TabStop = 0 'False
- Top = 240
- Width = 3855
- _Version = 65536
- _ExtentX = 6800
- _ExtentY = 5106
- _StockProps = 253
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 5730
- Top = 3870
- _Version = 65536
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- End
- Begin VB.Label Label2
- Caption = "Resize Mode:"
- Height = 255
- Left = 4080
- TabIndex = 13
- Top = 3960
- Width = 1455
- End
- Begin VB.Label Label1
- Caption = "Assign Mode:"
- Height = 255
- Left = 120
- TabIndex = 12
- Top = 3960
- Width = 1575
- End
- Begin VB.Label Label3
- Caption = "Source Picbuf"
- Height = 255
- Left = 120
- TabIndex = 14
- Top = 0
- Width = 1815
- End
- Begin VB.Label Label4
- Caption = "Destination Picbuf"
- Height = 255
- Left = 4080
- TabIndex = 15
- Top = 0
- Width = 2055
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuLoadSrc
- Caption = "&Load Source Image..."
- End
- Begin VB.Menu mnuLoadDest
- Caption = "Load &Destination Image..."
- End
- Begin VB.Menu mnuSaveSrc
- Caption = "&Save Source Image..."
- End
- Begin VB.Menu SaveDest
- Caption = "Save D&estination 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 event code decides which assign
- 'mode to use.
- Private Sub CmbAssignMode_Click()
- 'Set Assign Mode values according to combo box data
- PicbufSrc.AssignMode = Val(Left(cmbAssignMode.Text, 1))
- PicbufDest.AssignMode = Val(Left(cmbAssignMode.Text, 1))
- End Sub
- 'Description: This event code is used to decide
- 'which resize mode is used.
- Private Sub CmbResizeMode_Click()
- 'Set Assign Mode values according to combo box data
- PicbufSrc.ResizeMode = Val(Left(cmbResizeMode.Text, 1))
- PicbufDest.ResizeMode = Val(Left(cmbResizeMode.Text, 1))
- End Sub
- 'Description: Uses assign method to transfer an
- 'image from PicBufDest to PicBufSrc.
- Private Sub CmdDestToSrcAssign_Click()
- 'Invoke the Assign method.
- PicbufSrc.Assign OptSrcSel.Value, PicbufDest, OptDestSel.Value
- End Sub
- 'Description: Uses assign method to transfer an
- 'image from PicBufSrc to PicBufDest.
- Private Sub CmdSrcToDestAssign_Click()
- 'Invoke the Assign method
- PicbufDest.Assign OptDestSel.Value, PicbufSrc, OptSrcSel.Value
- End Sub
- Private Sub Form_Load()
- 'Set values for Assign Mode combo box
- InitCmbAssignMode cmbAssignMode
- 'Set values for Resize Mode combo box
- InitcmbResizeMode cmbResizeMode
- 'Set initial Option values
- OptSrcFull.Value = True
- OptDestFull.Value = True
- 'Set image locations
- InitPicbuf PicbufSrc, True, "leaves8.pcx"
- InitPicbuf PicbufDest, True, "marybeth.tif"
- 'Set selection areas for PicbufSrc & PicbufDest
- SetSelect PicbufSrc, 70, 30, 100, 100
- PicbufSrc.ForeColor = 255
- SetSelect PicbufDest, 40, 40, 100, 100
- 'Set drawing color for PicbufSrc & PicbufDest
- PicbufDest.ForeColor = 255
- PicbufSrc.ForeColor = 255
- End Sub
- 'Description: This module closes the program.
- Private Sub mnuExit_Click()
- ExitProgram
- End Sub
- 'Description: This module uses the common dialog
- 'control to load an image.
- Private Sub mnuLoadDest_Click()
- LoadImage PicbufDest, CommonDialog1
- End Sub
- 'Description: This module uses the common dialog
- 'control to load an image.
- Private Sub mnuLoadSrc_Click()
- LoadImage PicbufSrc, CommonDialog1
- End Sub
- 'Description: Reloads the images into the PicBufs.
- Private Sub mnuReload_Click()
- 'Reload original images
- PicbufSrc.Load
- PicbufDest.Load
- OptSrcFull.Value = True
- OptDestFull.Value = True
- End Sub
- 'Description: This module uses the common dialog
- 'control to save an image.
- Private Sub mnuSaveSrc_Click()
- SaveImage PicbufSrc, CommonDialog1
- End Sub
- 'Description: This code erases the box drawn on
- 'the picbuf.
- Private Sub OptDestFull_Click()
- PicbufDest.Refresh
- End Sub
- 'Description: This code draws a rectangle on the
- 'picbuf
- Private Sub OptDestSel_Click()
- PicbufDest.Rect 1
- End Sub
- 'Description: This code erases the box drawn on
- 'the picbuf.
- Private Sub OptSrcFull_Click()
- PicbufSrc.Refresh
- End Sub
- 'Description: This code draws a rectangle on the
- 'picbuf
- Private Sub OptSrcSel_Click()
- PicbufSrc.Rect 1
- End Sub
- 'Description: This module uses the common dialog
- 'control to save an image.
- Private Sub SaveDest_Click()
- SaveImage PicbufDest, CommonDialog1
- End Sub
-