home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Picture"
- ClientHeight = 4575
- ClientLeft = 555
- ClientTop = 1125
- ClientWidth = 9255
- Height = 5265
- Left = 495
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 305
- ScaleMode = 3 'Pixel
- ScaleWidth = 617
- Top = 495
- Width = 9375
- Begin VB.PictureBox Picture1
- Height = 3735
- Left = 5280
- ScaleHeight = 3675
- ScaleWidth = 3795
- TabIndex = 7
- Top = 240
- Width = 3855
- End
- Begin VB.CommandButton cmdCircular
- Caption = "DibToBitmap --> BitmapToDib"
- Height = 375
- Left = 720
- TabIndex = 6
- Top = 4080
- Width = 2535
- End
- Begin VB.CommandButton cmdBmToPb
- Caption = "Bitmap To Picbuf"
- Height = 495
- Left = 4080
- TabIndex = 5
- Top = 1200
- Width = 1095
- End
- Begin VB.CommandButton cmdPbToPict
- Caption = "Picbuf To Picture"
- Height = 495
- Left = 4080
- TabIndex = 2
- Top = 3480
- Width = 1095
- End
- Begin VB.CommandButton cmdPictToPb
- Caption = "Picture To Picbuf"
- Height = 495
- Left = 4080
- TabIndex = 1
- Top = 240
- Width = 1095
- End
- Begin ik32Lib.Picbuf Picbuf1
- Height = 3735
- Left = 120
- TabIndex = 0
- Top = 240
- Width = 3855
- _Version = 65536
- _ExtentX = 6800
- _ExtentY = 6588
- _StockProps = 253
- BackColor = 0
- End
- Begin VB.Line Line14
- X1 = 240
- X2 = 248
- Y1 = 272
- Y2 = 280
- End
- Begin VB.Line Line13
- X1 = 240
- X2 = 232
- Y1 = 272
- Y2 = 280
- End
- Begin VB.Line Line12
- X1 = 240
- X2 = 240
- Y1 = 288
- Y2 = 272
- End
- Begin VB.Line Line11
- X1 = 224
- X2 = 240
- Y1 = 288
- Y2 = 288
- End
- Begin VB.Line Line10
- X1 = 32
- X2 = 40
- Y1 = 296
- Y2 = 288
- End
- Begin VB.Line Line9
- X1 = 32
- X2 = 40
- Y1 = 280
- Y2 = 288
- End
- Begin VB.Line Line8
- X1 = 24
- X2 = 40
- Y1 = 288
- Y2 = 288
- End
- Begin VB.Line Line7
- X1 = 24
- X2 = 24
- Y1 = 272
- Y2 = 288
- End
- Begin VB.Line Line6
- X1 = 336
- X2 = 344
- Y1 = 208
- Y2 = 216
- End
- Begin VB.Line Line5
- X1 = 344
- X2 = 336
- Y1 = 216
- Y2 = 224
- End
- Begin VB.Line Line4
- X1 = 272
- X2 = 344
- Y1 = 216
- Y2 = 216
- End
- Begin VB.Line Line3
- X1 = 272
- X2 = 280
- Y1 = 64
- Y2 = 72
- End
- Begin VB.Line Line2
- X1 = 272
- X2 = 280
- Y1 = 64
- Y2 = 56
- End
- Begin VB.Line Line1
- X1 = 344
- X2 = 272
- Y1 = 64
- Y2 = 64
- End
- Begin VB.Label Label2
- Appearance = 0 'Flat
- Caption = "Microsoft Picture Control"
- ForeColor = &H80000008&
- Height = 255
- Left = 5280
- TabIndex = 4
- Top = 0
- Width = 1815
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- Caption = "ImageKnife Picbuf Control"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 0
- Width = 1935
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 4320
- Top = 2160
- _Version = 65536
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuLoadPicbuf
- Caption = "&Load Picbuf Image..."
- End
- Begin VB.Menu mnuLoadPicBox
- Caption = "Load &Picture Box 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
- Begin VB.Menu mnuClear
- Caption = "&Clear"
- Begin VB.Menu mnuClearPicbuf
- Caption = "&Picbuf"
- End
- Begin VB.Menu mnuClearPicture
- Caption = "P&icture Box"
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- 'Description: This code converts a bitmap to a
- 'device independent bitmap.
- Private Sub cmdBmToPb_Click()
- Picbuf1.BitmapToDib Picture1.Image
- End Sub
- 'Description: This code switches the image in the
- 'picbuf from a dib to a bitmap, and then from a
- 'bitmap back into a dib.
- Private Sub cmdCircular_Click()
- Dim handle As Integer
- handle = Picbuf1.DibToBitmap
- Picbuf1.Clear
- Picbuf1.BitmapToDib handle
- End Sub
- 'Description: This code transfers the image in the
- 'picture box to the picbuf.
- Private Sub cmdPbToPict_Click()
- Picture1.Picture = Picbuf1.Picture
- End Sub
- 'Description: This code transfers an image from the
- 'picbuf to the picture box.
- Private Sub cmdPictToPb_Click()
- Picbuf1.Picture = Picture1.Image
- End Sub
- 'Description: This code loads an image into the
- 'picbuf.
- Private Sub Form_Load()
- InitPicbuf Picbuf1, True, "rgb24.bmp"
- End Sub
- 'Description: This code clears the image from the
- 'picbuf.
- Private Sub mnuClearPicbuf_Click()
- Picbuf1.Clear
- End Sub
- 'Description: This code clears the image from the
- 'picture box.
- Private Sub mnuClearPicture_Click()
- Picture1.Picture = LoadPicture("")
- End Sub
- 'Description: This code ends the program.
- Private Sub mnuExit_Click()
- ExitProgram
- End Sub
- 'Description: This code uses the common dialog
- 'control to load an image into the picture box.
- Private Sub mnuLoadPicBox_Click()
- CommonDialog1.DialogTitle = "Load Image"
- CommonDialog1.Filter = "all files|*.*|BMP|*.bmp"
- CommonDialog1.FilterIndex = 2
- CommonDialog1.Flags = cdlOFNHideReadOnly Or cdlOFNFileMustExist
- On Error GoTo Cancel_Click
- CommonDialog1.CancelError = True
- CommonDialog1.ShowOpen
- Picture1.Picture = LoadPicture(CommonDialog1.Filename)
- Exit Sub
- Cancel_Click:
- If Err.Number = 32755 Then
- Exit Sub
- Else
- MsgBox Err.Description
- End If
- End Sub
- 'Description: This code uses the common dialog
- 'control to load an image into the picbuf control.
- Private Sub mnuLoadPicbuf_Click()
- LoadImage Picbuf1, CommonDialog1
- End Sub
- 'Description: This code reloads the image into the
- 'picbuf control.
- Private Sub mnuReload_Click()
- Picbuf1.Load
- End Sub
-