home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / 256PB2 / 256PICBX.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-03-13  |  8.5 KB  |  200 lines

  1. frm256PicBx
  2. &256 Color VB Picture Box Demonstration
  3. Form1%
  4. PicPreviewSource
  5. PicScrollBarFiller
  6. PicPreviewHScroll    
  7. W    pbPreview
  8. &Preview
  9. cbDrives
  10. PicPreviewVScroll
  11. PicPreview
  12. lbFileList
  13. *.bmp
  14. R    lbDirList
  15. pbCancel
  16. E&XIT
  17. Label4
  18. D&rives
  19. Label3
  20. &Bitmap Files
  21. Label2
  22. &Directories
  23. labDirSelected
  24. Label1
  25. Current Directory:
  26. hDIBUtilG
  27. hPalette
  28. hDIBBuffer
  29. lpDIBBuffer[
  30.     Form_Load
  31. OldMousePtr
  32. Screen
  33. MousePointer
  34.     HOURGLASS
  35. Set_ModalDlg_SysMenu
  36. frm256PicBxm
  37. StartingDir
  38. labDirSelected
  39. Captiont
  40. cbDrives
  41. Drive
  42.     lbDirList
  43. Path~
  44. SBColors
  45. GetProfileInfom
  46. PicScrollbarFiller
  47.     BackColor
  48. LoadLibrary
  49. NULL.
  50. lbDirList_Change
  51. lbFileList
  52. pbCancel_Click^
  53. cbDrives_Change
  54. lbFileList_DblClickT
  55. pbPreview_Click
  56. lbFileList_PathChange
  57.     ListIndexd
  58. SrcXm
  59. DestXC
  60. DestY
  61. bmpWidth&
  62.     bmpHeight
  63. ShowFiller
  64. PicPreview
  65. Picture|
  66. PicPreviewSource
  67.     ListCount)
  68. FastExitW
  69. FName
  70. ListQ
  71. DIBLoad3
  72. GlobalLock
  73. DIBWidth
  74.     DIBHeight
  75.     ReturnVal
  76. GlobalUnlock
  77. ScaleWidth
  78.     DestWidth+
  79. ScaleHeight{
  80. DestHeight
  81. PicPreviewHScrollS
  82. Visible
  83. FALSE
  84. SmallChange
  85. LargeChangeA
  86. Value
  87. PicPreviewVScrollp
  88. DeleteObject
  89. CreateDIBPalette
  90. hOldPalette
  91. SelectPalette
  92. RealizePalette
  93. hBitmap
  94. CreateDIBitmap
  95. CBM_INIT
  96. FindDIBBits
  97. DIB_RGB_INFO
  98.     hCompatDC
  99. CreateCompatibleDC
  100. hPrevBmp
  101. SelectObject
  102. Success
  103. BitBlt
  104. SRCCOPY
  105. DeleteDCf
  106. GlobalFree
  107. MovePic;
  108. PicPreviewHScroll_Change
  109. PicPreviewVScroll_Changep
  110. Form_Unload
  111. Cancel
  112. FreeLibrary
  113. Section
  114. KeyName
  115. Result
  116. ResultLength
  117. GetProfileString
  118. A_Form
  119. HSysMenu
  120. GetSystemMenu
  121. RemoveMenu
  122. MF_BYPOSITION
  123. APIError
  124. AutoRedraw
  125. Form`
  126.  Handle to our dll
  127.  Handle to a palette created for previewing a bitmap
  128.  Handle to a global memory area into which a DIB file has been read 
  129.  (for use with DIB utility routines)
  130.  A pointer to the actual memory buffer containing the DIB 
  131. cbDrives_Change
  132. Form_Load
  133. Remove all but Move and Close from the system menu
  134. Set up starting directoryl
  135. Set the color of the "filler" between scroll barsr
  136. Colors
  137. ScrollBar
  138.  Load the DIBUTIL library"
  139. DIBUTIL.DLL
  140.  Since we haven't yet created a palette, initialize hPalette tor
  141.  null to indicate this
  142. Form_Unload
  143.  if hPalette is not 0 then we've created a palette that"
  144.  should be deleted before we terminate the program
  145. (Form_Unload) Warning: Could not delete hPalette!
  146.  Allow Windows to unload our dll
  147. GetProfileInfo
  148. lbDirList_Change
  149. lbFileList_DblClick
  150. lbFileList_PathChange
  151. MovePic
  152. Set up bitblt parameters
  153. In case anyone has changed the palette since we last painted,
  154. realize it (again)
  155. Blast the new picture into the preview picture box
  156. If the picture box has AutoRedraw on, it must be refreshed
  157. pbCancel_Click
  158. pbPreview_Click
  159. Set an hourglass cursor
  160. Clear any existing bitmaps
  161. Any bitmap files in the listbox?
  162. Please select a Bitmap file before pressing the Preview button
  163. If no bitmap file is selected, take the first one 
  164. Load the bitmap into memory and get its dimensions
  165. Error loading 
  166. Set up bitblt parameters
  167. Set up the scroll bars
  168. If we have previously created a palette, delete it now
  169. (pbPreview_Click) Warning: Could not delete hPalette!
  170. Create a new palette for this bitmap
  171.  Make sure DC containing the persistent image has the right palette
  172.  Make sure the picture box DC has the right paletteh
  173. Lock the memory block
  174.  Create a Device Dependent Bitmap 
  175.  Create a memory DC from which we can bitblt the image.  Select in and
  176.  realize the palette, then select in the ddb
  177. hOldPalette% = SelectPalette(hCompatDC%, hPalette, FALSE)S
  178. ReturnVal% = RealizePalette(hCompatDC%),
  179. Blast the image into our hidden picture boxa
  180. Free up resources we no longer need
  181. (pbPreview_Click) Warning: Could not delete hComptDC%!
  182. (pbPreview_Click) Warning: Could not delete hBitmap%!
  183. release previously allocated memoryn
  184. Now fill in the scrollable picture box
  185. Restore the cursor
  186. PicPreviewHScroll_Change
  187. PicPreviewVScroll_Change
  188. Set_ModalDlg_SysMenu
  189.  Obtain the handle to the forms System menu 
  190.  Remove all but the MOVE and CLOSE options.  The menu items
  191.  must be removed starting with the last menu item to prevent
  192.  the menu items from taking on new position values as othert
  193.  menu items are being removed.
  194. Switch to.
  195. Separator.
  196. Separator.
  197. Maximize
  198. Minimize
  199. Restoree
  200.