home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / olympus / ik32_15t / vb4.shr / ioDIB.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-07-24  |  6.3 KB  |  204 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Import & Export DIB"
  5.    ClientHeight    =   3375
  6.    ClientLeft      =   1140
  7.    ClientTop       =   2055
  8.    ClientWidth     =   7935
  9.    Height          =   4065
  10.    Left            =   1080
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3375
  16.    ScaleWidth      =   7935
  17.    Top             =   1425
  18.    Width           =   8055
  19.    Begin VB.Frame Frame2 
  20.       Caption         =   "Export/Import"
  21.       Height          =   1455
  22.       Left            =   3240
  23.       TabIndex        =   7
  24.       Top             =   1800
  25.       Width           =   1455
  26.       Begin VB.CommandButton cmdExpSrcToDest 
  27.          Caption         =   "S&ource To Destination"
  28.          Height          =   495
  29.          Left            =   120
  30.          TabIndex        =   9
  31.          Top             =   240
  32.          Width           =   1215
  33.       End
  34.       Begin VB.CommandButton cmdExpDestToSrc 
  35.          Caption         =   "D&estination To Source"
  36.          Height          =   495
  37.          Left            =   120
  38.          TabIndex        =   8
  39.          Top             =   840
  40.          Width           =   1215
  41.       End
  42.    End
  43.    Begin VB.Frame Frame1 
  44.       Caption         =   "Duplicate/Import"
  45.       Height          =   1455
  46.       Left            =   3240
  47.       TabIndex        =   4
  48.       Top             =   240
  49.       Width           =   1455
  50.       Begin VB.CommandButton cmdDupDestToSrc 
  51.          Caption         =   "&Destination To Source"
  52.          Height          =   495
  53.          Left            =   120
  54.          TabIndex        =   6
  55.          Top             =   840
  56.          Width           =   1215
  57.       End
  58.       Begin VB.CommandButton cmdDupSrcToDest 
  59.          Caption         =   "&Source To Destination"
  60.          Height          =   495
  61.          Left            =   120
  62.          TabIndex        =   5
  63.          Top             =   240
  64.          Width           =   1215
  65.       End
  66.    End
  67.    Begin ik32Lib.Picbuf PicbufSrc 
  68.       Height          =   3015
  69.       Left            =   120
  70.       TabIndex        =   1
  71.       Top             =   240
  72.       Width           =   3015
  73.       _Version        =   65536
  74.       _ExtentX        =   5318
  75.       _ExtentY        =   5318
  76.       _StockProps     =   253
  77.    End
  78.    Begin ik32Lib.Picbuf PicbufDest 
  79.       Height          =   3015
  80.       Left            =   4800
  81.       TabIndex        =   0
  82.       Top             =   240
  83.       Width           =   3015
  84.       _Version        =   65536
  85.       _ExtentX        =   5318
  86.       _ExtentY        =   5318
  87.       _StockProps     =   253
  88.    End
  89.    Begin MSComDlg.CommonDialog CommonDialog1 
  90.       Left            =   5280
  91.       Top             =   1800
  92.       _Version        =   65536
  93.       _ExtentX        =   847
  94.       _ExtentY        =   847
  95.       _StockProps     =   0
  96.    End
  97.    Begin VB.Label Label2 
  98.       Caption         =   "Destination Picbuf"
  99.       Height          =   255
  100.       Left            =   4800
  101.       TabIndex        =   3
  102.       Top             =   0
  103.       Width           =   1455
  104.    End
  105.    Begin VB.Label Label1 
  106.       Caption         =   "Source Picbuf"
  107.       Height          =   255
  108.       Left            =   120
  109.       TabIndex        =   2
  110.       Top             =   0
  111.       Width           =   1575
  112.    End
  113.    Begin VB.Menu mnuFile 
  114.       Caption         =   "&File"
  115.       Begin VB.Menu mnuLoadSource 
  116.          Caption         =   "Load &Source Image..."
  117.       End
  118.       Begin VB.Menu mnuLoadDestination 
  119.          Caption         =   "Load &Destination Image..."
  120.       End
  121.       Begin VB.Menu mnuSpacer 
  122.          Caption         =   "-"
  123.       End
  124.       Begin VB.Menu mnuExit 
  125.          Caption         =   "E&xit"
  126.          Shortcut        =   ^X
  127.       End
  128.    End
  129.    Begin VB.Menu mnuReload 
  130.       Caption         =   "&Reload"
  131.    End
  132. Attribute VB_Name = "Form1"
  133. Attribute VB_Creatable = False
  134. Attribute VB_Exposed = False
  135. Option Explicit
  136. 'Description: This code uses the DuplicateDib and
  137. 'ImportDib methods to use handles to DIBs to
  138. 'transfer images.
  139. Private Sub cmdDupDestToSrc_Click()
  140.     Dim hDIBExport As Double
  141.     'export from source picbuf
  142.     hDIBExport = Picbufdest.DuplicateDib(False)
  143.     'import into destination picbuf
  144.     Picbufsrc.ImportDib hDIBExport, True
  145. End Sub
  146. 'Description: This code uses the DuplicateDib and
  147. 'ImportDib methods to use handles to DIBs to
  148. 'transfer images.
  149. Private Sub cmdDupSrcToDest_Click()
  150.     Dim hDIBExport As Double
  151.     'export from source picbuf
  152.     hDIBExport = Picbufsrc.DuplicateDib(False)
  153.     'import into destination picbuf
  154.     Picbufdest.ImportDib hDIBExport, True
  155. End Sub
  156. 'Description: This code uses the ExportDib and
  157. 'ImportDib methods to use handles to DIBs to
  158. 'transfer images.
  159. Private Sub cmdExpSrcToDest_Click()
  160.     Dim hDIBExport As Double
  161.     'export from source picbuf
  162.     hDIBExport = Picbufsrc.ExportDib(True)
  163.     'import into destination picbuf
  164.     Picbufdest.ImportDib hDIBExport, True
  165. End Sub
  166. 'Description: This code uses the ExportDib and
  167. 'ImportDib methods to use handles to DIBs to
  168. 'transfer images.
  169. Private Sub cmdExpDestToSrc_Click()
  170.     Dim hDIBExport As Double
  171.     'export from source picbuf
  172.     hDIBExport = Picbufdest.ExportDib(True)
  173.     'import into destination picbuf
  174.     Picbufsrc.ImportDib hDIBExport, True
  175. End Sub
  176. 'Description: This code sets properties for the
  177. 'picbuf control
  178. Private Sub Form_Load()
  179.     InitPicbuf Picbufsrc, True, "squirrel.bmp"
  180.     InitPicbuf Picbufdest, True, "balloon.bmp"
  181. End Sub
  182. 'Description: This code ends the program
  183. Private Sub mnuExit_Click()
  184.     ExitProgram
  185. End Sub
  186. 'Description: This code calls a sub which loads
  187. 'an image into the picbuf using the common
  188. 'dialog control.
  189. Private Sub mnuLoadDestination_Click()
  190.     LoadImage Picbufdest, CommonDialog1
  191. End Sub
  192. 'Description: This code calls a sub which loads
  193. 'an image into the picbuf using the common
  194. 'dialog control.
  195. Private Sub mnuLoadSource_Click()
  196.     LoadImage Picbufsrc, CommonDialog1
  197. End Sub
  198. 'Description: This code reloads the picbufs with
  199. 'their original images
  200. Private Sub mnuReload_Click()
  201.     Picbufsrc.Load
  202.     Picbufdest.Load
  203. End Sub
  204.