home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / About_Scre933026122002.psc / APIGraphics.bas < prev    next >
Encoding:
BASIC Source File  |  2002-05-01  |  112.9 KB  |  2,549 lines

  1. Attribute VB_Name = "modAPIGraphics"
  2. '=================================
  3. ' Date : 12/11/2001
  4. '----------------------------------------------
  5. ' Author : Eric O'Sullivan
  6. '----------------------------------------------
  7. ' Contact : DiskJunky@hotmail.com
  8. '----------------------------------------------
  9. ' Comments :
  10. 'This module was made for using api graphics functions in your
  11. 'programs. With the following api calls and function and procedures
  12. 'written by me, you have to tools to do almost anything. The only api
  13. 'function listed here that is not directly used by any piece of code
  14. 'in this module is BitBlt. You have the tools to create and manipulate
  15. 'graphics, but it is still necessary to display them manually. The
  16. 'functions themselves mostly need hDc or a handle to work. You can
  17. 'find this hDc in both a forms and pictureboxs' properties. I have
  18. 'also set up a data type called BitmapStruc. For my programs, I have
  19. 'used this structure almost exclusivly for the graphics. The structure
  20. 'holds all the information needed to reference a bitmap created using
  21. 'this module (CreateNewBitmap, DeleteBitmap).
  22. 'Please keep in mind that any object (bitmap, brush, pen etc) needs to
  23. 'be deleted after use or else it will stay in memory until the program is
  24. 'finished. Not doing so will eventually cause your program to take up
  25. 'ALL your computers recources.
  26. 'Also for anyone using optional paramters, it is probably better to use
  27. 'a default parameter values to determine whether or not a parameter
  28. 'has been passed than the function IsMissing().
  29. '
  30. 'Thank you,
  31. 'Eric
  32. '----------------------------------------------
  33. '=================================
  34.  
  35. Option Explicit
  36. Option Private Module
  37.  
  38. '--------------------------------------------------------------------------
  39. 'API calls
  40. '--------------------------------------------------------------------------
  41. 'These functions are sorted alphabetically.
  42.  
  43. 'this will alphablend two bitmaps by a specified
  44. 'blend amount.
  45. Public Declare Function AlphaBlend _
  46.        Lib "msimg32" _
  47.             (ByVal hDcDest As Long, _
  48.              ByVal intLeftDest As Integer, _
  49.              ByVal intTopDest As Integer, _
  50.              ByVal intWidthDest As Integer, _
  51.              ByVal intHeightDest As Integer, _
  52.              ByVal hDcSource As Long, _
  53.              ByVal intLeftSource As Integer, _
  54.              ByVal intTopSource As Integer, _
  55.              ByVal intWidthSource As Integer, _
  56.              ByVal intHeightSource As Integer, _
  57.              ByVal lngBlendFunctionStruc As Long) _
  58.              As Long
  59.  
  60. 'This is used to copy bitmaps
  61. Public Declare Function BitBlt _
  62.        Lib "gdi32" _
  63.             (ByVal hDestDC As Long, _
  64.              ByVal X As Long, _
  65.              ByVal Y As Long, _
  66.              ByVal nWidth As Long, _
  67.              ByVal nHeight As Long, _
  68.              ByVal hSrcDC As Long, _
  69.              ByVal xSrc As Long, _
  70.              ByVal ySrc As Long, _
  71.              ByVal dwRop As Long) _
  72.              As Long
  73.  
  74. 'used to change various windows settings
  75. Public Declare Function ChangeDisplaySettings _
  76.        Lib "user32" _
  77.        Alias "ChangeDisplaySettingsA" _
  78.             (ByRef wef As Any, _
  79.              ByVal i As Long) _
  80.              As Long
  81.  
  82. 'creates a brush object which can be applied to a bitmap
  83. Public Declare Function CreateBrushIndirect _
  84.        Lib "gdi32" _
  85.             (lpLogBrush As LogBrush) _
  86.              As Long
  87.  
  88. 'creates a colourspace object which can be applied to a bitmap
  89. Public Declare Function CreateColorSpace _
  90.        Lib "gdi32" _
  91.        Alias "CreateColorSpaceA" _
  92.             (lplogcolorspace As LogColorSpace) _
  93.              As Long
  94.  
  95. 'the will create a bitmap compatable with the passed hDc
  96. Public Declare Function CreateCompatibleBitmap _
  97.        Lib "gdi32" _
  98.             (ByVal hDc As Long, _
  99.             ByVal nWidth As Long, _
  100.             ByVal nHeight As Long) _
  101.             As Long
  102.  
  103. 'this create a compatable device context with the specified
  104. 'windows handle
  105. Public Declare Function CreateCompatibleDC _
  106.        Lib "gdi32" _
  107.             (ByVal hDc As Long) _
  108.              As Long
  109.  
  110. 'creates an elliptical region in a hDc
  111. Public Declare Function CreateEllipticRgn _
  112.        Lib "gdi32" _
  113.             (ByVal X1 As Long, _
  114.              ByVal Y1 As Long, _
  115.              ByVal X2 As Long, _
  116.              ByVal Y2 As Long) _
  117.              As Long
  118.  
  119. 'creates an elliptical region in a hDc
  120. Public Declare Function CreateEllipticRgnIndirect _
  121.        Lib "gdi32" _
  122.             (EllRect As Rect) _
  123.              As Long
  124.  
  125. 'creates a font compatable with the specified device context
  126. Public Declare Function CreateFontIndirect _
  127.        Lib "gdi32" _
  128.        Alias "CreateFontIndirectA" _
  129.             (lpLogFont As LogFont) _
  130.              As Long
  131.  
  132. 'creates a pen that can be applied to a hDc
  133. Public Declare Function CreatePen _
  134.        Lib "gdi32" _
  135.             (ByVal nPenStyle As Long, _
  136.              ByVal nWidth As Long, _
  137.              ByVal crColor As Long) _
  138.              As Long
  139.  
  140. 'creates a pen that can be applied to a hDc
  141. Public Declare Function CreatePenIndirect _
  142.        Lib "gdi32" _
  143.             (lpLogPen As LogPen) _
  144.              As Long
  145.  
  146. 'creates a rectangular region on a hDc
  147. Public Declare Function CreateRectRgn _
  148.        Lib "gdi32" _
  149.             (Left As Integer, _
  150.              Top As Integer, _
  151.              Right As Integer, _
  152.              Bottom As Integer) _
  153.              As Long
  154.  
  155. 'creates a solid colour brush to be applied to
  156. 'a bitmap
  157. Public Declare Function CreateSolidBrush _
  158.        Lib "gdi32" _
  159.             (ColorRef As Long) _
  160.              As Long
  161.  
  162. 'removes a device context from memory
  163. Public Declare Function DeleteDC _
  164.        Lib "gdi32" _
  165.             (ByVal hDc As Long) _
  166.              As Long
  167.  
  168. 'removes an object such as a brush or bitmap from memory
  169. Public Declare Function DeleteObject _
  170.        Lib "gdi32" _
  171.             (ByVal hObject As Long) _
  172.              As Long
  173.  
  174. 'this draws the animated minimize/maximize rectangeles
  175. Public Declare Function DrawAnimatedRects _
  176.        Lib "user32" _
  177.             (ByVal hWnd As Long, _
  178.              ByVal idAni As Long, _
  179.              lprcFrom As Rect, _
  180.              lprcTo As Rect) _
  181.              As Long
  182.  
  183. 'this draws an icon onto a surphase (eg, a bitmap)
  184. Public Declare Function DrawIconEx _
  185.        Lib "user32" _
  186.             (ByVal hDc As Long, _
  187.              ByVal xLeft As Long, _
  188.              ByVal yTop As Long, _
  189.              ByVal hIcon As Long, _
  190.              ByVal cxWidth As Long, _
  191.              ByVal cyWidth As Long, _
  192.              ByVal istepIfAniCur As Long, _
  193.              ByVal hbrFlickerFreeDraw As Long, _
  194.              ByVal diFlags As Long) _
  195.              As Long
  196.  
  197. 'this draws text onto the bitmap
  198. Public Declare Function DrawText _
  199.        Lib "user32" _
  200.        Alias "DrawTextA" _
  201.             (ByVal hDc As Long, _
  202.              ByVal lpStr As String, _
  203.              ByVal nCount As Long, _
  204.              lpRect As Rect, _
  205.              ByVal wFormat As Long) _
  206.              As Long
  207.  
  208. 'this draws an ellipse onto the bitmap
  209. Public Declare Function Ellipse _
  210.        Lib "gdi32" _
  211.             (ByVal hDc As Long, _
  212.              X1 As Integer, _
  213.              Y1 As Integer, _
  214.              X2 As Integer, _
  215.              Y2 As Integer) _
  216.              As Boolean
  217.  
  218. 'this will set the display settings
  219. Public Declare Function EnumDisplaySettings _
  220.        Lib "user32" _
  221.        Alias "EnumDisplaySettingsA" _
  222.             (ByVal A As Long, _
  223.              ByVal B As Long, _
  224.              wef As DEVMODE) _
  225.              As Boolean
  226.  
  227. 'this provides more control than the CreatePen function
  228. Public Declare Function ExtCreatePen _
  229.        Lib "gdi32" _
  230.             (ByVal dwPenStyle As Long, _
  231.              ByVal dwWidth As Long, _
  232.              lplb As LogBrush, _
  233.              ByVal dwStyleCount As Long, _
  234.              lpStyle As Long) _
  235.              As Long
  236.  
  237. 'this will fill the rectangle with the brush applied
  238. 'to the hDc
  239. Public Declare Function FillRect _
  240.        Lib "user32" _
  241.             (ByVal hWnd As Long, _
  242.              Fill As Rect, _
  243.              hBrush As Long) _
  244.              As Integer
  245.  
  246. 'this will fill a region with the brush specified
  247. Public Declare Function FillRgn _
  248.        Lib "gdi32" _
  249.             (ByVal hDc As Long, _
  250.              ByVal HRgn As Long, _
  251.              hBrush As Long) _
  252.              As Boolean
  253.  
  254. 'this will find a window based on its class and
  255. 'window name
  256. Public Declare Function FindWindow _
  257.        Lib "user32" _
  258.        Alias "FindWindowA" _
  259.             (ByVal lpClassName As String, _
  260.              ByVal lpWindowName As String) _
  261.              As Long
  262.  
  263. 'this will return the handle of the top-most window
  264. Public Declare Function GetActiveWindow _
  265.        Lib "user32" _
  266.             () _
  267.              As Long
  268.  
  269. 'this will get the state of any specified key - even
  270. 'the mouse buttons
  271. Public Declare Function GetAsyncKeyState _
  272.        Lib "user32" _
  273.             (ByVal vKey As Long) _
  274.              As Integer
  275.  
  276. 'this will get the dimensions of the specified bitmap
  277. Public Declare Function GetBitmapDimensionEx _
  278.        Lib "gdi32" _
  279.             (ByVal hBitmap As Long, _
  280.              lpDimension As SizeType) _
  281.              As Long
  282.  
  283. 'this will get the class name from the handle of the
  284. 'window specified
  285. Public Declare Function GetClassName _
  286.        Lib "user32" _
  287.        Alias "GetClassNameA" _
  288.             (ByVal hWnd As Long, _
  289.              ByVal lpClassName As String, _
  290.              ByVal nMaxCount As Long) _
  291.              As Long
  292.  
  293. 'this will capture a screen shot of the specified
  294. 'area of the client
  295. Public Declare Function GetClientRect _
  296.        Lib "user32" _
  297.             (ByVal hWnd As Long, _
  298.              lpRect As Rect) _
  299.              As Long
  300.  
  301. 'this gets the cursors icon picture
  302. Public Declare Function GetCursor _
  303.        Lib "user32" _
  304.             () _
  305.              As Long
  306.  
  307. 'this gets the position of the cursor on the screen
  308. '(given in pixels)
  309. Public Declare Function GetCursorPos _
  310.        Lib "user32" _
  311.             (lpPoint As PointAPI) _
  312.              As Long
  313.  
  314. 'gets a hDc of the specified window
  315. Public Declare Function GetDC _
  316.        Lib "user32" _
  317.             (ByVal hWnd As Long) _
  318.             As Long
  319.  
  320. 'gets the entire screen area
  321. Public Declare Function GetDesktopWindow _
  322.        Lib "user32" _
  323.             () _
  324.              As Long
  325.  
  326. 'this will get the current devices' capabilities
  327. Public Declare Function GetDeviceCaps _
  328.        Lib "gdi32" _
  329.             (ByVal hDc As Long, _
  330.              ByVal nIndex As Long) _
  331.              As Long
  332.  
  333. 'get the last error to occur from within the api
  334. Public Declare Function GetLastError _
  335.        Lib "kernel32" _
  336.             () _
  337.              As Long
  338.  
  339. 'get the handle of the menu bar on a window
  340. Private Declare Function GetMenu _
  341.         Lib "user32" _
  342.             (ByVal hWnd As Long) _
  343.              As Long
  344.  
  345. 'Get the sub menu ID number. This is used to
  346. 'reference sub menus along with their handle
  347. Private Declare Function GetMenuItemID _
  348.         Lib "user32" _
  349.             (ByVal hMenu As Long, _
  350.              ByVal nPos As Long) _
  351.              As Long
  352.  
  353. 'get information about the specified object such as
  354. 'its dimensions etc.
  355. Public Declare Function GetObjectAPI _
  356.        Lib "gdi32" _
  357.        Alias "GetObjectA" _
  358.             (ByVal hObject As Long, _
  359.              ByVal nCount As Long, _
  360.              lpObject As Any) _
  361.              As Long
  362.  
  363. 'get the colour of the specified pixel
  364. Public Declare Function GetPixel _
  365.        Lib "gdi32" _
  366.             (ByVal hDc As Long, _
  367.              ByVal X As Long, _
  368.              ByVal Y As Long) _
  369.              As Long
  370.  
  371. 'this will get the handle of a specified
  372. 'sub menu using the handle of the menu
  373. 'and the item ID
  374. Private Declare Function GetSubMenu _
  375.         Lib "user32" _
  376.             (ByVal hMenu As Long, _
  377.              ByVal nPos As Long) _
  378.              As Long
  379.  
  380. 'get the dimensions of the applied text metrics for
  381. 'the device context
  382. Public Declare Function GetTextMetrics _
  383.        Lib "gdi32" _
  384.        Alias "GetTextMetricsA" _
  385.             (ByVal hDc As Long, _
  386.              lpMetrics As TEXTMETRIC) _
  387.              As Long
  388.  
  389. 'returns the amount of time windows has been active for
  390. 'in milliseconds (sec/1000)
  391. Public Declare Function GetTickCount _
  392.        Lib "kernel32" _
  393.             () _
  394.              As Long  'very usefull timing function ;)
  395.  
  396. 'retrieves the handle of a window that has the
  397. 'specified relationship to the specified window.
  398. Public Declare Function GetWindow _
  399.        Lib "user32" _
  400.             (ByVal hWnd As Long, _
  401.              ByVal wCmd As Long) _
  402.              As Long
  403.  
  404. 'gets the area the specified window takes up
  405. Public Declare Function GetWindowRect _
  406.        Lib "user32" _
  407.             (ByVal hWnd As Long, _
  408.              lpRect As Rect) _
  409.              As Long
  410.  
  411. 'increases the size of a rect structure
  412. Public Declare Function InflateRect _
  413.        Lib "user32" _
  414.             (lpRect As Rect, _
  415.              ByVal X As Long, _
  416.              ByVal Y As Long) _
  417.              As Long
  418.  
  419. 'gets any intersection of two rectangles
  420. Public Declare Function IntersectRect _
  421.        Lib "user32" _
  422.             (lpDestRect As Rect, _
  423.              lpSrc1Rect As Rect, _
  424.              lpSrc2Rect As Rect) _
  425.              As Long
  426.  
  427. 'draws a line from the current position to the
  428. 'specified co-ordinates
  429. Public Declare Function LineTo _
  430.        Lib "gdi32" _
  431.             (ByVal hDc As Long, _
  432.              XEnd As Integer, _
  433.              YEnd As Integer) _
  434.              As Boolean
  435.  
  436. 'this will load a cursor into a device context
  437. Public Declare Function LoadCursor _
  438.        Lib "user32" _
  439.        Alias "LoadCursorA" _
  440.             (ByVal hInstance As Long, _
  441.              ByVal lpCursorName As Any) _
  442.              As Long
  443.  
  444. 'this will load an image into a device context
  445. Public Declare Function LoadImage _
  446.        Lib "user32" _
  447.        Alias "LoadImageA" _
  448.             (ByVal hInst As Long, _
  449.              ByVal lpsz As String, _
  450.              ByVal un1 As Long, _
  451.              ByVal n1 As Long, _
  452.              ByVal n2 As Long, _
  453.              ByVal un2 As Long) _
  454.              As Long
  455.  
  456. 'This stops the specified window from updating
  457. 'its display. This is mainly used to help cut out
  458. 'flicker but does not work on controls.
  459. Public Declare Function LockWindowUpdate _
  460.        Lib "user32" _
  461.             (ByVal hwndLock As Long) _
  462.              As Long
  463. 'changes some of a menu's properties
  464. Private Declare Function ModifyMenu _
  465.         Lib "user32" _
  466.         Alias "ModifyMenuA" _
  467.             (ByVal hMenu As Long, _
  468.              ByVal nPosition As Long, _
  469.              ByVal wFlags As Long, _
  470.              ByVal wIDNewItem As Long, _
  471.              ByVal lpString As Any) _
  472.              As Long
  473.  
  474. 'moves the current position to the specified
  475. 'point
  476. Public Declare Function MoveToEx _
  477.        Lib "gdi32" _
  478.             (ByVal hDc As Long, _
  479.              X As Integer, _
  480.              Y As Integer, _
  481.              lpPoint As PointAPI) _
  482.              As Boolean
  483.  
  484. 'multiplies two numbers and divides them by a third
  485. 'numbers
  486. Public Declare Function MulDiv _
  487.        Lib "kernel32" _
  488.             (ByVal nNumber As Long, _
  489.              ByVal nNumerator As Long, _
  490.              ByVal nDenominator As Long) _
  491.              As Long
  492.  
  493. 'This will increase or decrease a rectangles
  494. 'co-ordinates by the specified amount. Usefull
  495. 'for moving graphic blocks as rect structures.
  496. Public Declare Function OffsetRect _
  497.        Lib "user32" _
  498.             (lpRect As Rect, _
  499.              ByVal X As Long, _
  500.              ByVal Y As Long) _
  501.              As Long
  502.  
  503. 'Pattern Blitter. Used to draw a pattern onto
  504. 'a device context
  505. Public Declare Function PatBlt _
  506.        Lib "gdi32" _
  507.             (ByVal hDc As Long, _
  508.              ByVal X As Long, _
  509.              ByVal Y As Long, _
  510.              ByVal nWidth As Long, _
  511.              ByVal nHeight As Long, _
  512.              ByVal dwRop As Long) _
  513.              As Long
  514.  
  515. 'This draws a polygon onto a device context
  516. 'useing an array.
  517. Public Declare Function Polygon _
  518.        Lib "gdi32" _
  519.             (ByVal hDc As Long, _
  520.              lpPoint As PointAPI, _
  521.              ByVal nCount As Long) _
  522.              As Long
  523.  
  524. 'This will draw a set of lines to the specifed
  525. 'points
  526. Public Declare Function Polyline _
  527.        Lib "gdi32" _
  528.             (ByVal hDc As Long, _
  529.              lpPoint As PointAPI, _
  530.              ByVal nCount As Long) _
  531.              As Long
  532.  
  533. 'This will draw a set of lines starting from
  534. 'the current position on the device context.
  535. Public Declare Function PolylineTo _
  536.        Lib "gdi32" _
  537.             (ByVal hDc As Long, _
  538.              lppt As PointAPI, _
  539.              ByVal cCount As Long) _
  540.              As Long
  541.  
  542. 'This draws a rectangle onto the device
  543. 'context
  544. Public Declare Function Rectangle _
  545.        Lib "gdi32" _
  546.             (ByVal hWnd As Long, _
  547.              X1 As Integer, _
  548.              Y1 As Integer, _
  549.              X2 As Integer, _
  550.              Y2 As Integer) _
  551.              As Long
  552.  
  553. 'This will release a device context from
  554. 'memory. Not to be confused with DeleteDC
  555. Public Declare Function ReleaseDC _
  556.        Lib "user32" _
  557.             (ByVal hWnd As Long, _
  558.              ByVal hDc As Long) _
  559.              As Long
  560.  
  561. 'this will draw a round-cornered rectangle
  562. 'onto the specified device context
  563. Public Declare Function RoundRect _
  564.        Lib "gdi32" _
  565.             (ByVal hDc As Long, _
  566.              ByVal Left As Long, _
  567.              ByVal Top As Long, _
  568.              ByVal Right As Long, _
  569.              ByVal Bottom As Long, _
  570.              ByVal X3 As Long, _
  571.              ByVal Y3 As Long) _
  572.              As Long
  573.  
  574. 'this can convert entire type structures
  575. 'to other types like a Long
  576. Private Declare Sub RtlMoveMemory _
  577.         Lib "kernel32.dll" _
  578.             (Destination As Any, _
  579.              Source As Any, _
  580.              ByVal Length As Long)
  581.  
  582. 'this will select the specified object to
  583. 'a window or device context
  584. Public Declare Function SelectObject _
  585.        Lib "gdi32" _
  586.             (ByVal hDc As Long, _
  587.              ByVal hObject As Long) _
  588.              As Long
  589.  
  590. 'This sets the background colour on a bitmap
  591. Public Declare Function SetBkColor _
  592.        Lib "gdi32" _
  593.             (ByVal hDc As Long, _
  594.              ByVal crColor As Long) _
  595.              As Long
  596.  
  597. 'This sets the background mode on a bitmap
  598. '(eg, transparent, solid etc)
  599. Public Declare Function SetBkMode _
  600.        Lib "gdi32" _
  601.             (ByVal hDc As Long, _
  602.              ByVal nBkMode As Long) _
  603.              As Long
  604.  
  605. 'The color adjustment values are used to adjust
  606. 'the input color of the source bitmap for calls
  607. 'to the StretchBlt and StretchDIBits functions
  608. 'when HALFTONE mode is set.
  609. Public Declare Function SetColorAdjustment _
  610.        Lib "gdi32" _
  611.             (ByVal hDc As Long, _
  612.              lpca As COLORADJUSTMENT) _
  613.              As Long
  614.  
  615. 'sets the colourspace to a device context
  616. Public Declare Function SetColorSpace _
  617.        Lib "gdi32" _
  618.             (ByVal hDc As Long, _
  619.              ByVal hcolorspace As Long) _
  620.              As Long
  621.  
  622. 'sets the bitmap of a menu
  623. Private Declare Function SetMenuItemBitmaps _
  624.         Lib "user32" _
  625.             (ByVal hMenu As Long, _
  626.              ByVal nPosition As Long, _
  627.              ByVal wFlags As Long, _
  628.              ByVal hBitmapUnchecked As Long, _
  629.              ByVal hBitmapChecked As Long) _
  630.              As Long
  631.  
  632. 'sets the current information about the selected menu
  633. Private Declare Function SetMenuItemInfo _
  634.         Lib "user32" _
  635.         Alias "SetMenuItemInfoA" _
  636.             (ByVal hMenu As Long, _
  637.              ByVal uItem As Long, _
  638.              ByVal fByPosition As Long, _
  639.              lpmii As MENUITEMINFO) _
  640.              As Long
  641.  
  642. 'sets the colour of the specified pixel
  643. Public Declare Function SetPixel _
  644.        Lib "gdi32" _
  645.             (ByVal hDc As Long, _
  646.              ByVal X As Long, _
  647.              ByVal Y As Long, _
  648.              ByVal crColor As Long) _
  649.              As Long
  650.  
  651. 'sets the rectangles size and position
  652. Public Declare Function SetRect _
  653.        Lib "user32" _
  654.             (lpRect As Rect, _
  655.              ByVal X1 As Long, _
  656.              ByVal Y1 As Long, _
  657.              ByVal X2 As Long, _
  658.              ByVal Y2 As Long) _
  659.              As Long
  660.  
  661. 'sets the current text colour
  662. Public Declare Function SetTextColor _
  663.        Lib "gdi32" _
  664.             (ByVal hDc As Long, _
  665.              ByVal crColor As Long) _
  666.              As Long
  667.  
  668. 'pauses the execution of the programs thread
  669. 'for a specified amount of milliseconds
  670. Public Declare Sub Sleep _
  671.        Lib "kernel32" _
  672.             (ByVal dwMilliseconds As Long)
  673.  
  674. 'used to stretch or shrink a bitmap
  675. Public Declare Function StretchBlt _
  676.        Lib "gdi32" _
  677.             (ByVal hDc As Long, _
  678.              ByVal X As Long, _
  679.              ByVal Y As Long, _
  680.              ByVal nWidth As Long, _
  681.              ByVal nHeight As Long, _
  682.              ByVal hSrcDC As Long, _
  683.              ByVal xSrc As Long, _
  684.              ByVal ySrc As Long, _
  685.              ByVal nSrcWidth As Long, _
  686.              ByVal nSrcHeight As Long, _
  687.              ByVal dwRop As Long) _
  688.              As Long
  689.  
  690.  
  691. '--------------------------------------------------------------------------
  692. 'enumerator section
  693. '--------------------------------------------------------------------------
  694.  
  695. 'the direction of the gradient
  696. Public Enum GradientTo
  697.     GradHorizontal = 0
  698.     GradVertical = 1
  699. End Enum
  700.  
  701. 'in twips or pixels
  702. Public Enum Scaling
  703.     InTwips = 0
  704.     InPixels = 1
  705. End Enum
  706.  
  707. 'The key values of the mouse buttons
  708. Public Enum MouseKeys
  709.     MouseLeft = 1
  710.     MouseRight = 2
  711.     MouseMiddle = 4
  712. End Enum
  713.  
  714. 'text alignment constants
  715. Public Enum AlignText
  716.     vbLeftAlign = 1
  717.     vbCentreAlign = 2
  718.     vbRightAlign = 3
  719. End Enum
  720.  
  721. 'bitmap flip constants
  722. Public Enum FlipType
  723.     FlipHorizontally = 0
  724.     FlipVertically = 1
  725. End Enum
  726.  
  727. 'image load constants
  728. Public Enum LoadType
  729.     IMAGE_BITMAP& = 0
  730. End Enum
  731.     
  732. 'rotate bitmap constants
  733. Public Enum RotateType
  734.     RotateRight = 0
  735.     RotateLeft = 1
  736.     Rotate180 = 2
  737. End Enum
  738.  
  739. '--------------------------------------------------------------------------
  740. 'Programmer defined data types
  741. '--------------------------------------------------------------------------
  742.  
  743. 'AlphaBlend information for bitmaps
  744. Private Type BLENDFUNCTION
  745.     bytBlendOp As Byte              'currently the only blend op supported by windows 98+ is AC_SRC_OVER
  746.     bytBlendFlags As Byte           'must be left blank
  747.     bytSourceConstantAlpha As Byte  'the amount to blend by. Must be between 0 and 255
  748.     bytAlphaFormat As Byte          'don't set this. If you wish more infor, go to "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_3b3m.asp"
  749. End Type
  750.  
  751. 'Bitmap structue for menu information
  752. Private Type MENUITEMINFO
  753.   cbSize As Long
  754.   fMask As Long
  755.   fType As Long
  756.   fState As Long
  757.   wID As Long
  758.   hSubMenu As Long
  759.   hbmpChecked As Long
  760.   hbmpUnchecked As Long
  761.   dwItemData As Long
  762.   dwTypeData As String
  763.   cch As Long
  764. End Type
  765.  
  766. 'size structure
  767. Public Type SizeType
  768.         cx As Long
  769.         cy As Long
  770. End Type
  771.  
  772. 'Text metrics
  773. Public Type TEXTMETRIC
  774.         tmHeight As Long
  775.         tmAscent As Long
  776.         tmDescent As Long
  777.         tmInternalLeading As Long
  778.         tmExternalLeading As Long
  779.         tmAveCharWidth As Long
  780.         tmMaxCharWidth As Long
  781.         tmWeight As Long
  782.         tmOverhang As Long
  783.         tmDigitizedAspectX As Long
  784.         tmDigitizedAspectY As Long
  785.         tmFirstChar As Byte
  786.         tmLastChar As Byte
  787.         tmDefaultChar As Byte
  788.         tmBreakChar As Byte
  789.         tmItalic As Byte
  790.         tmUnderlined As Byte
  791.         tmStruckOut As Byte
  792.         tmPitchAndFamily As Byte
  793.         tmCharSet As Byte
  794. End Type
  795.  
  796.  
  797. Public Type COLORADJUSTMENT
  798.         caSize As Integer
  799.         caFlags As Integer
  800.         caIlluminantIndex As Integer
  801.         caRedGamma As Integer
  802.         caGreenGamma As Integer
  803.         caBlueGamma As Integer
  804.         caReferenceBlack As Integer
  805.         caReferenceWhite As Integer
  806.         caContrast As Integer
  807.         caBrightness As Integer
  808.         caColorfulness As Integer
  809.         caRedGreenTint As Integer
  810. End Type
  811.  
  812. Public Type CIEXYZ
  813.     ciexyzX As Long
  814.     ciexyzY As Long
  815.     ciexyzZ As Long
  816. End Type
  817.  
  818. Public Type CIEXYZTRIPLE
  819.     ciexyzRed As CIEXYZ
  820.     ciexyzGreen As CIEXYZ
  821.     ciexyBlue As CIEXYZ
  822. End Type
  823.  
  824. Public Type LogColorSpace
  825.     lcsSignature As Long
  826.     lcsVersion As Long
  827.     lcsSize As Long
  828.     lcsCSType As Long
  829.     lcsIntent As Long
  830.     lcsEndPoints As CIEXYZTRIPLE
  831.     lcsGammaRed As Long
  832.     lcsGammaGreen As Long
  833.     lcsGammaBlue As Long
  834.     lcsFileName As String * 26 'MAX_PATH
  835. End Type
  836.  
  837. 'display settings (800x600 etc)
  838. Public Type DEVMODE
  839.         dmDeviceName As String * 32
  840.         dmSpecVersion As Integer
  841.         dmDriverVersion As Integer
  842.         dmSize As Integer
  843.         dmDriverExtra As Integer
  844.         dmFields As Long
  845.         dmOrientation As Integer
  846.         dmPaperSize As Integer
  847.         dmPaperLength As Integer
  848.         dmPaperWidth As Integer
  849.         dmScale As Integer
  850.         dmCopies As Integer
  851.         dmDefaultSource As Integer
  852.         dmPrintQuality As Integer
  853.         dmColor As Integer
  854.         dmDuplex As Integer
  855.         dmYResolution As Integer
  856.         dmTTOption As Integer
  857.         dmCollate As Integer
  858.         dmFormName As String * 32
  859.         dmUnusedPadding As Integer
  860.         dmBitsPerPel As Long
  861.         dmPelsWidth As Long
  862.         dmPelsHeight As Long
  863.         dmDisplayFlags As Long
  864.         dmDisplayFrequency As Long
  865. End Type
  866.  
  867. Public Type Rect
  868.     Left As Long
  869.     Top As Long
  870.     Right As Long
  871.     Bottom As Long
  872. End Type
  873.  
  874. Public Type BitmapStruc
  875.     hDcMemory As Long
  876.     hDcBitmap As Long
  877.     hDcPointer As Long
  878.     Area As Rect
  879. End Type
  880.  
  881. Public Type PointAPI
  882.     X As Long
  883.     Y As Long
  884. End Type
  885.  
  886. Public Type LogPen
  887.         lopnStyle As Long
  888.         lopnWidth As PointAPI
  889.         lopnColor As Long
  890. End Type
  891.  
  892. Public Type LogBrush
  893.         lbStyle As Long
  894.         lbColor As Long
  895.         lbHatch As Long
  896. End Type
  897.  
  898. Public Type FontStruc
  899.     Name As String
  900.     Alignment As AlignText
  901.     Bold As Boolean
  902.     Italic As Boolean
  903.     Underline As Boolean
  904.     StrikeThru As Boolean
  905.     PointSize As Byte
  906.     Colour As Long
  907. End Type
  908.  
  909. Public Type LogFont
  910.     'for the DrawText api call
  911.     lfHeight As Long
  912.     lfWidth As Long
  913.     lfEscapement As Long
  914.     lfOrientation As Long
  915.     lfWeight As Long
  916.     lfItalic As Byte
  917.     lfUnderline As Byte
  918.     lfStrikeOut As Byte
  919.     lfCharSet As Byte
  920.     lfOutPrecision As Byte
  921.     lfClipPrecision As Byte
  922.     lfQuality As Byte
  923.     lfPitchAndFamily As Byte
  924.     lfFaceName(1 To 32) As Byte
  925. End Type
  926.  
  927. Public Type Point
  928.     'you'll need this to reference a point on the
  929.     'screen'
  930.     X As Integer
  931.     Y As Integer
  932. End Type
  933.  
  934. 'To hold the RGB value
  935. Public Type RGBVal
  936.     Red As Single
  937.     Green As Single
  938.     Blue As Single
  939. End Type
  940.  
  941. 'bitmap structure for the GetObject api call
  942. Public Type BITMAP '14 bytes
  943.         bmType As Long
  944.         bmWidth As Long
  945.         bmHeight As Long
  946.         bmWidthBytes As Long
  947.         bmPlanes As Integer
  948.         bmBitsPixel As Integer
  949.         bmBits As Long
  950. End Type
  951.  
  952. '--------------------------------------------------------------------------
  953. 'Constants section
  954. '--------------------------------------------------------------------------
  955.  
  956. 'general constants
  957. Public Const GW_CHILD = 5
  958. Public Const GW_HWNDFIRST = 0
  959. Public Const GW_HWNDLAST = 1
  960. Public Const GW_HWNDNEXT = 2
  961. Public Const GW_HWNDPREV = 3
  962. Public Const GWL_WNDPROC = (-4)
  963. Public Const IDANI_OPEN = &H1
  964. Public Const IDANI_CLOSE = &H2
  965. Public Const IDANI_CAPTION = &H3
  966. Public Const WM_USER = &H400
  967.  
  968. 'alphablend constants
  969. Public Const AC_SRC_OVER = &H0
  970. Public Const AC_SRC_ALPHA = &H0
  971.  
  972. 'Image load constants
  973. Public Const LR_LOADFROMFILE As Long = &H10
  974. Public Const LR_CREATEDIBSECTION As Long = &H2000
  975. Public Const LR_DEFAULTSIZE As Long = &H40
  976.  
  977. 'PatBlt constants
  978. Public Const PATCOPY = &HF00021 ' (DWORD) dest = pattern
  979. Public Const PATINVERT = &H5A0049       ' (DWORD) dest = pattern XOR dest
  980. Public Const PATPAINT = &HFB0A09        ' (DWORD) dest = DPSnoo
  981. Public Const DSTINVERT = &H550009       ' (DWORD) dest = (NOT dest)
  982. Public Const BLACKNESS = &H42 ' (DWORD) dest = BLACK
  983. Public Const WHITENESS = &HFF0062       ' (DWORD) dest = WHITE
  984.  
  985. 'Display constants
  986. Public Const CDS_FULLSCREEN = 4
  987. Public Const DM_BITSPERPEL = &H40000
  988. Public Const DM_PELSWIDTH = &H80000
  989. Public Const DM_PELSHEIGHT = &H100000
  990. Public Const DM_DISPLAYFLAGS = &H200000
  991. Public Const DM_DISPLAYFREQUENCY = &H400000
  992.  
  993. 'DrawText constants
  994. Public Const DT_CENTER = &H1
  995. Public Const DT_BOTTOM = &H8
  996. Public Const DT_CALCRECT = &H400
  997. Public Const DT_EXPANDTABS = &H40
  998. Public Const DT_EXTERNALLEADING = &H200
  999. Public Const DT_LEFT = &H0
  1000. Public Const DT_NOCLIP = &H100
  1001. Public Const DT_NOPREFIX = &H800
  1002. Public Const DT_RIGHT = &H2
  1003. Public Const DT_SINGLELINE = &H20
  1004. Public Const DT_TABSTOP = &H80
  1005. Public Const DT_TOP = &H0
  1006. Public Const DT_VCENTER = &H4
  1007. Public Const DT_WORDBREAK = &H10
  1008. Public Const TRANSPARENT = 1
  1009. Public Const OPAQUE = 2
  1010.  
  1011. 'CreateBrushIndirect constants
  1012. Public Const BS_DIBPATTERN = 5
  1013. Public Const BS_DIBPATTERN8X8 = 8
  1014. Public Const BS_DIBPATTERNPT = 6
  1015. Public Const BS_HATCHED = 2
  1016. Public Const BS_HOLLOW = 1
  1017. Public Const BS_NULL = 1
  1018. Public Const BS_PATTERN = 3
  1019. Public Const BS_PATTERN8X8 = 7
  1020. Public Const BS_SOLID = 0
  1021. Public Const HS_BDIAGONAL = 3               '  /////
  1022. Public Const HS_CROSS = 4                   '  +++++
  1023. Public Const HS_DIAGCROSS = 5               '  xxxxx
  1024. Public Const HS_FDIAGONAL = 2               '  \\\\\
  1025. Public Const HS_HORIZONTAL = 0              '  -----
  1026. Public Const HS_NOSHADE = 17
  1027. Public Const HS_SOLID = 8
  1028. Public Const HS_SOLIDBKCLR = 23
  1029. Public Const HS_SOLIDCLR = 19
  1030. Public Const HS_VERTICAL = 1                '  |||||
  1031.  
  1032. 'BitBlt constants
  1033. Public Const SRCAND = &H8800C6  ' (DWORD) dest = source AND dest
  1034. Public Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
  1035. Public Const SRCERASE = &H440328        ' (DWORD) dest = source AND (NOT dest )
  1036. Public Const SRCINVERT = &H660046       ' (DWORD) dest = source XOR dest
  1037. Public Const SRCPAINT = &HEE0086        ' (DWORD) dest = source OR dest
  1038. Public Const MERGECOPY = &HC000CA       ' (DWORD) dest = (source AND pattern)
  1039. Public Const MERGEPAINT = &HBB0226      ' (DWORD) dest = (NOT source) OR dest
  1040. Public Const NOTSRCCOPY = &H330008      ' (DWORD) dest = (NOT source)
  1041. Public Const NOTSRCERASE = &H1100A6     ' (DWORD) dest = (NOT src) AND (NOT dest)
  1042.  
  1043. 'LogFont constants
  1044. Public Const LF_FACESIZE = 32
  1045. Public Const FW_BOLD = 700
  1046. Public Const FW_DONTCARE = 0
  1047. Public Const FW_EXTRABOLD = 800
  1048. Public Const FW_EXTRALIGHT = 200
  1049. Public Const FW_HEAVY = 900
  1050. Public Const FW_LIGHT = 300
  1051. Public Const FW_MEDIUM = 500
  1052. Public Const FW_NORMAL = 400
  1053. Public Const FW_SEMIBOLD = 600
  1054. Public Const FW_THIN = 100
  1055. Public Const DEFAULT_CHARSET = 1
  1056. Public Const OUT_CHARACTER_PRECIS = 2
  1057. Public Const OUT_DEFAULT_PRECIS = 0
  1058. Public Const OUT_DEVICE_PRECIS = 5
  1059. Public Const OUT_OUTLINE_PRECIS = 8
  1060. Public Const OUT_RASTER_PRECIS = 6
  1061. Public Const OUT_STRING_PRECIS = 1
  1062. Public Const OUT_STROKE_PRECIS = 3
  1063. Public Const OUT_TT_ONLY_PRECIS = 7
  1064. Public Const OUT_TT_PRECIS = 4
  1065. Public Const CLIP_CHARACTER_PRECIS = 1
  1066. Public Const CLIP_DEFAULT_PRECIS = 0
  1067. Public Const CLIP_EMBEDDED = 128
  1068. Public Const CLIP_LH_ANGLES = 16
  1069. Public Const CLIP_MASK = &HF
  1070. Public Const CLIP_STROKE_PRECIS = 2
  1071. Public Const CLIP_TT_ALWAYS = 32
  1072. Public Const WM_SETFONT = &H30
  1073. Public Const LF_FULLFACESIZE = 64
  1074. Public Const DEFAULT_PITCH = 0
  1075. Public Const DEFAULT_QUALITY = 0
  1076. Public Const PROOF_QUALITY = 2
  1077.  
  1078. 'GetDeviceCaps constants
  1079. Public Const LOGPIXELSY = 90        '  Logical pixels/inch in Y
  1080.  
  1081. 'colourspace constants
  1082. Public Const MAX_PATH = 260
  1083.  
  1084. 'pen constants
  1085. Public Const PS_COSMETIC = &H0
  1086. Public Const PS_DASH = 1                    '  -------
  1087. Public Const PS_DASHDOT = 3                 '  _._._._
  1088. Public Const PS_DASHDOTDOT = 4              '  _.._.._
  1089. Public Const PS_DOT = 2                     '  .......
  1090. Public Const PS_ENDCAP_ROUND = &H0
  1091. Public Const PS_ENDCAP_SQUARE = &H100
  1092. Public Const PS_ENDCAP_FLAT = &H200
  1093. Public Const PS_GEOMETRIC = &H10000
  1094. Public Const PS_INSIDEFRAME = 6
  1095. Public Const PS_JOIN_BEVEL = &H1000
  1096. Public Const PS_JOIN_MITER = &H2000
  1097. Public Const PS_JOIN_ROUND = &H0
  1098. Public Const PS_SOLID = 0
  1099.  
  1100. 'mouse cursor constants
  1101. Public Const IDC_APPSTARTING = 32650&
  1102. Public Const IDC_ARROW = 32512&
  1103. Public Const IDC_CROSS = 32515&
  1104. Public Const IDC_IBEAM = 32513&
  1105. Public Const IDC_ICON = 32641&
  1106. Public Const IDC_NO = 32648&
  1107. Public Const IDC_SIZE = 32640&
  1108. Public Const IDC_SIZEALL = 32646&
  1109. Public Const IDC_SIZENESW = 32643&
  1110. Public Const IDC_SIZENS = 32645&
  1111. Public Const IDC_SIZENWSE = 32642&
  1112. Public Const IDC_SIZEWE = 32644&
  1113. Public Const IDC_UPARROW = 32516&
  1114. Public Const IDC_WAIT = 32514&
  1115.  
  1116. 'menu constants
  1117. Private Const MFT_RADIOCHECK = &H200&
  1118. Private Const MF_BITMAP = &H4&
  1119. Private Const MIIM_TYPE = &H10
  1120. Private Const MIIM_SUBMENU = &H4
  1121.  
  1122. 'some key values for GetASyncKeyState
  1123. Public Const KLeft = 37
  1124. Public Const KUp = 38
  1125. Public Const KRight = 39
  1126. Public Const KDown = 40
  1127.  
  1128. 'some mathimatical constants
  1129. Public Const Pi = 3.14159265358979
  1130.  
  1131. '--------------------------------------------------------------------------
  1132. 'Variable declarations section
  1133. '--------------------------------------------------------------------------
  1134.  
  1135. 'This stores the various points of a polygon. Use DrawPoly to draw
  1136. 'the polygon with the points specified in the array.
  1137. 'Also see AddToPoly, ClearPoly and DelFromPoly
  1138. Private PolygonPoints() As PointAPI
  1139.  
  1140. 'some general variables used by some api calls
  1141. Private rctFrom As Rect
  1142. Private rctTo As Rect
  1143. Private lngTrayHand As Long
  1144. Private lngStartMenuHand As Long
  1145. Private lngChildHand As Long
  1146. Private strClass As String * 255
  1147. Private lngClassNameLen As Long
  1148. Private lngRetVal As Long
  1149. Private blnResChanged As Boolean
  1150.  
  1151. '--------------------------------------------------------------------------
  1152. 'Procedures/functions section
  1153. '--------------------------------------------------------------------------
  1154.  
  1155. Public Sub WinBlend(ByVal lngDesthDc As Long, _
  1156.                     ByVal lngPic1hDc As Long, _
  1157.                     ByVal lngPic2hDc As Long, _
  1158.                     ByVal intDestX As Integer, _
  1159.                     ByVal intDestY As Integer, _
  1160.                     ByVal intWidth As Integer, _
  1161.                     ByVal intHeight As Integer, _
  1162.                     ByVal lngPic1X As Integer, _
  1163.                     ByVal lngPic1Y As Integer, _
  1164.                     ByVal lngPic2X As Integer, _
  1165.                     ByVal lngPic2Y As Integer, _
  1166.                     Optional ByVal sngBlendAmount As Single = 0.5, _
  1167.                     Optional ByVal enmMeasurement As Scaling = InPixels)
  1168.  
  1169.     'This uses the windows GDI to blend two bitmaps
  1170.     'together. If you need to use a blend mask, then
  1171.     'please use the BFAlphaBlend procedure. This function
  1172.     'is only supported by w98+ and w2000+
  1173.     
  1174.     Dim udtTempBmp As BitmapStruc       'this temperorily holds the blended pictures before copying to the destination bitmap
  1175.     Dim udtBlendInfo As BLENDFUNCTION   'this sets the blend information for the api call
  1176.     Dim lngBlendStruc As Long           'this will hold the converted BLENDFUNCTION structure
  1177.     Dim lngResult As Long               'this holds any error value returned from the api call
  1178.     Dim intPxlHeight As Integer         'the height in twips of a pixel
  1179.     Dim intPxlWidth As Integer          'the width in twips of a pixel
  1180.     
  1181.     'convert values to pixels if necessary
  1182.     If enmMeasurement = InTwips Then
  1183.         'get the pixel intHeight and intWidth
  1184.         'values per twips in the current
  1185.         'screen resolution.
  1186.         intPxlHeight = Screen.TwipsPerPixelY
  1187.         intPxlWidth = Screen.TwipsPerPixelX
  1188.         
  1189.         'start converting the twip values to pixels
  1190.         intDestX = intDestX / intPxlWidth
  1191.         intWidth = intWidth / intPxlWidth
  1192.         lngPic1X = lngPic1X / intPxlWidth
  1193.         lngPic2X = lngPic2X / intPxlWidth
  1194.         intDestY = intDestY / intPxlHeight
  1195.         intHeight = intHeight / intPxlHeight
  1196.         lngPic1Y = lngPic1Y / intPxlHeight
  1197.         lngPic2Y = lngPic2Y / intPxlHeight
  1198.     End If
  1199.     
  1200.     'set the blend information
  1201.     With udtBlendInfo
  1202.         .bytBlendOp = AC_SRC_OVER
  1203.         .bytSourceConstantAlpha = CByte(255 * sngBlendAmount)
  1204.     End With
  1205.     
  1206.     'convert the type to a long
  1207.     Call RtlMoveMemory(lngBlendStruc, _
  1208.                        udtBlendInfo, _
  1209.                        4)
  1210.     
  1211.     With udtTempBmp
  1212.         'set the bitmap dimensions
  1213.         With .Area
  1214.             .Bottom = intHeight
  1215.             .Right = intWidth
  1216.         End With
  1217.         
  1218.         'create the new bitmap
  1219.         Call CreateNewBitmap(.hDcMemory, _
  1220.                              .hDcBitmap, _
  1221.                              .hDcPointer, _
  1222.                              .Area, _
  1223.                              lngDesthDc)
  1224.         
  1225.         'copy the first picture
  1226.         lngResult = BitBlt(.hDcMemory, _
  1227.                            0, _
  1228.                            0, _
  1229.                            intWidth, _
  1230.                            intHeight, _
  1231.                            lngPic1hDc, _
  1232.                            lngPic1X, _
  1233.                            lngPic1Y, _
  1234.                            SRCCOPY)
  1235.         
  1236.         'blend the second picture with
  1237.         'the first picture
  1238.         lngResult = AlphaBlend(.hDcMemory, _
  1239.                                0, _
  1240.                                0, _
  1241.                                intWidth, _
  1242.                                intHeight, _
  1243.                                lngPic2hDc, _
  1244.                                lngPic2X, _
  1245.                                lngPic2Y, _
  1246.                                intWidth, _
  1247.                                intHeight, _
  1248.                                lngBlendStruc)
  1249.         
  1250.         'copy the picture to the destination
  1251.         lngResult = BitBlt(lngDesthDc, _
  1252.                            intDestX, _
  1253.                            intDestY, _
  1254.                            intWidth, _
  1255.                            intHeight, _
  1256.                            .hDcMemory, _
  1257.                            0, _
  1258.                            0, _
  1259.                            SRCCOPY)
  1260.         
  1261.         'remove the temperory bitmap from memory
  1262.         Call DeleteBitmap(.hDcMemory, _
  1263.                           .hDcBitmap, _
  1264.                           .hDcPointer)
  1265.     End With
  1266. End Sub
  1267.  
  1268.  
  1269. Public Sub BFAlphaBlend(ByVal lngDesthDc As Long, _
  1270.                         ByVal lngPic1hDc As Long, _
  1271.                         ByVal lngPic2hDc As Long, _
  1272.                         ByVal intDestX As Integer, _
  1273.                         ByVal intDestY As Integer, _
  1274.                         ByVal intWidth As Integer, _
  1275.                         ByVal intHeight As Integer, _
  1276.                         ByVal lngPic1X As Integer, _
  1277.                         ByVal lngPic1Y As Integer, _
  1278.                         ByVal lngPic2X As Integer, _
  1279.                         ByVal lngPic2Y As Integer, _
  1280.                         Optional ByVal sngBlendAmount As Single = 0.5, _
  1281.                         Optional ByVal lngMaskhDc As Long = 0, _
  1282.                         Optional ByVal intMeasurement As Scaling = InPixels)
  1283.  
  1284.     'This is a "brute force" alpha blend function. Because it's written in
  1285.     'vb, this function is not as fast at it might otherwise be in another
  1286.     'language like C++ or Fox.
  1287.     'The purpose of the function is to mix the colours of two bitmaps to
  1288.     'produce a result that looks like both pictures. Think of it as fading
  1289.     'one picture into another. I get the pixel colour of a point in picture1,
  1290.     'and the colour of the corresponding pixel in pixture2, find the 'middle'
  1291.     'colour and put it into the destination bitmap. There are no calls to
  1292.     'other procedures or functions other than api calls. This is to improve
  1293.     'speed as all calculations are made internally.
  1294.     'The parameter sngBlendAmount MUST be between 1 and 0. If not then
  1295.     'the value is rounded to 1 or zero.
  1296.     'However, sngBlendAmount is ignored if a Mask bitmap has been specified.
  1297.     'Please note that if the mask used only contains black or white pixels,
  1298.     'then it is recommended that you use the MergeBitmaps procedure as
  1299.     'it will process the bitmaps much faster (by about 15 to 30 times).
  1300.     'Keep in mind that using a mask bitmap is a----- 30 tubliESS = &HFF001as fare n           'get the pixel 3)ttst FW_BO O)5
  1301.     bytAlphaFormat As Byte          'don't set this. If you wish more infor, go to "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_3b3m.asp"
  1302. End Type
  1303.  
  1304. 'Bitmap structue for menu information
  1305. Private Type MENUITEMINFO
  1306.   cbSSub BFAlphap_
  1307.              ByVal un1 rst
  1308. Public Cor GetASyn
  1309.     bytAlphaFormat As Byte          'don't set thi           ByVal lngPic1hDyVal lngPn1 rsic Const BS_HOLLOW = 1
  1310. Public Const BngPn1 rsic Coong, _
  1311.          'creblic Con
  1312.     bytAlphaFormat As ByS_SOLID = 0
  1313.  
  1314. 'mouse cursor constants)O bytc Con set thi           ByVal _and put it inault.a2            in(Faonst SRCCyVal nctif            udtBlendInfo, _
  1315. Y As Long) _, _
  1316.    N      ByVal _and put it inault.a2       TOptional ByVal RO
  1317. 'window s &H"HByVal _and put it inault.a2       TOptim           intHeight, _
  1318.              re Func          Optional ByVal unc          Op KfSlngPic2Y =al l     re ntegelmwindow.
  1319. Pesult = BitBlt(mwindow.
  1320. Pesult = BitBlt(mwindow.
  1321. Pe
  1322. Public Coind  Dimg, _
  1323.      Long)S-------
  1324. cF_FACESIZE =------ apilt = BitBlt(mwinDc As eH f it as fe MergeBitmaps p   Optional ByVal lngMaskVal          l lngMaskVal          l lngMaskVaIZE =--ow.
  1325. Pesult = BitBlt(mwindow.
  1326. Pesmaps p   Optit(mwind lngBltapilt = BitBl           .hDc       ' (D.d As Long
  1327. Private strClass As String * 255
  1328. Pri6ie   B----g    TOw    'colLong
  1329. Private t BSk0Public Cons1     lngRes rsie t BSk0Public Cons1         l l"user32" _
  1330.             (lpPoint As PoaOSc Cons1     lngRes rsie t BSk0        B BidsInterse is" _
  1331.     1                   Tmory, _
  1332.    c Const ion Modiut As PoaOSmCharSet As Bypi3R3wise(ut As PoaOSmCharSet As Bypi3R3wise(ut 
  1333. Private rctTo
  1334.     'T
  1335. Private lzal hDc As Long, _
  1336.              ByVal hObject As=FULLFACESIZE idth
  1337.         lngPic1X = lngPic1X / intPxlWidth
  1338.         lngPic'Thisser32" _2" _rmation for the api call
  1339.    PI"PPic'Thisser32" _2" _rmation for the apiiof lines tsCFl
  1340.    PI"PPic'Thisser32" _2" _rmati2" _infor, go to "http:/r32" _2" _r        ln'creblic C           . Typr        ln'cr)ntHeight Ago          . T---------ttp://msdn.microsoft.com/lis=FULLFACtmaps p   Optional ByVal lngMask lngPic1X =    intDestY = intDByValal lic1X lngPer32" _
  1341.             (lpPoint As Poast n1X lngPCERASE = uS
  1342.  
  1343. 'some int As .=1e) OR tY = EvDAgo      O ByVaunction PatB
  1344. 'PcNamMf it as fe MergeBitmaps p   Optional ByVals _rmati2" _infor,        askVal          l lngMaskVaIZong, _       .BConsttrClTntWidth =2       (RASE = &H44t)
  1345.     End With
  1346.     
  1347.     'convert the type to agMaskVaIZong, eral variablOptia0m.onst IDANI_Che tyg lngPic1hDc As Long, _
  1348.            
  1349.    PI"PPic'Thissesadp   Optional ByVal lngMask lngPic1X =    intDestY = intDByValal lic1X lngPer32" _
  1350.             (lpPoint As Poast n1X lngPCERASE = uS
  1351.  
  1352. 'some int As .=1e) OR t _
  1353.    ndAmount Mrwise be il hDc As Long, _1lor As Long) _
  1354.    se be il hrLORADJ'mou.=1e) OR t _
  1355.    ndAmount Mrwise be  t _o          a
  1356.             .Bottom = intHeight
  1357.         ictures. Think of it as faight
  1358.       hinkl
  1359.    PI"PPic'T2     .hDAs Bd    ByVals _rmati2" _infor,        askVal      s tsCFl
  1360.    PI"Pterse is" _ammaRed As Long
  1361.     lcsGammaGreen As Long
  1362.     lcsGammaBlue As Ln As LongX
  1363.  kPEf be  t _o        kPEf be .P As Long
  1364. VDim lngBlendStruc As Longm8e.P As Long
  1365. VDim lngStruc As Lohey'DyVal lngPn1ngBlendStryhDcBiInteger
  1366.         caGreenGamma Ast BSk0Public Cons1     lngRes rsie t mma onGa2Intec1X lngPer32" _As Lohey'DyVal  Loheygs
  1367. Public Const LF_FACESIZE = 32
  1368. Public Const FW_BOLD = 700
  1369. Public Const FW_DONTCARE =smDefaultChar As Byte
  1370.       cMemory, _
  1371. (3nd tk0Public Cons1     lngRes rsie t mma on
  1372.   Nn Moongo msfaultChar5     lngPic))Xease notnDs rsie tClTntWidth =2       (RASE = &H44t)
  1373.   ()SSub BFAlphap_
  1374.  )Xeas'This will releasl lngPInte&
  1375. Public ConxlWidth
  1376.    OeCTdoaOSttp://msdn.ic ConCcaGrS the SVal   lngPic1Xes or functioBrsieoW= 900
  1377. Puk'PI
  1378.         lopnColor As Long
  1379. End Type
  1380. sponding pixafend(ertical = 1
  1381. End Enum
  1382.  
  1383. 'in twips or pixels
  1384. Public Enum Scaling
  1385.     InTwips = 0
  1386.     InPixels = 1
  1387. End Enum
  1388.  
  1389. 'The key values of the mouse butPHe             askVal               ByVal intDestY As Integer, nT Integer
  1390.         caGre,nteger, nT Integerl
  1391.     'one picturvate tong
  1392.      BConsttrClTntWidth =2       (RASE = &gPic2 =al l Inte&
  1393. Public ConxlY
  1394.      BConte&
  1395. Puwips = 0ferse is" _
  1396.     1     s = 0ferse is" _
  1397.     1     s = 0ferse is" _
  1398.     1     s = 0ferse is" _
  1399.     1     s =tical = 1
  1400. End Enum
  1401.  
  1402. 'in twipnumpixels
  1403. Public e
  1404.     'one picturvas=FULLFACESIZE idth
  1405.         lngPic1X = lngPic1X / intPxlWidth
  1406.         lngPic'Thisser32" _2" _rmation for the api call
  1407.    PI"PPic'Thisser32" _2" _rmation for tuA 0, _
  1408.     EK3WidthI"PPic'T2 s .=1e) OR t _
  1409.    n rmatrse is" _
  1410.     1     s = 0ferse is" _
  1411.     1     s    'done is" _
  1412.     1     s    'done isic'W Bition ReS api call
  1413.  As Long
  1414.         t     Te1X = lngPicS    t _
  1415.  2         'dooof tpre
  1416.     frse is" _
  1417.     1     s = 0ferse is" _
  1418.     1     s = 0flic Enum _
  1419.     1     s = 0flic Enum _
  1420.     1     s = 0flic Enum _
  1421.     1     s = 0flic Enum _
  1422.     1     se is" _)DONTCARE    1     s = 0flic Enum _
  1423.    A3             W X, al intDestY As Intege-sser32" _2"=O_
  1424.     1     sAs Integer, t FW_BOLD n/H = 2 As ntation 1oXnts)O bytc Con set thi 
  1425.         lng      tdsnteger
  1426.         ca" _2)intAPI, _
  1427.  r(MHic CotEeAs Integer
  1428.     ul intDestY mit will pro 2o n1X lngPCERASE       t n1X00
  1429. Pe tof the functiontheps p   Optional ByVal lngMask lngPic1X     
  1430.     the functioQUENCY = &H400000
  1431.  
  1432. 'DrawText constantsd2Intec1X lngPer32" _As Lohey'DtHei)IS     caGreenGamma (tantss
  1433. Pub)l   lngZE idDtHei)IS  )n           'gPublic Type LogFont
  1434.     'for the D( As PoaOSm  tmDigitizedAspectX Asand the"Pterse is2)pe LogFont
  1435. 0ul" _
  1436.         Alimma (tantss
  1437. Pub)5pul"els,
  1438.     'tmma (tantss
  1439. eger, _
  1440.     
  1441.     InTwiit ina----- CtCharIuml" _
  1442.          'gPubl 2 s .=1e)Sb0=l" _
  1443.          'gPuPIpdate _
  1444.   )1e)Sb0=l" _
  1445.      P
  1446. sponding ate _
  1447.   )1e)Sb0=l" _
  1448.      P
  1449. slSum _spondb0=l" _
  1450.      P1e)Sb0=l" _aered rectangleCtmam0go     -------ma (taSk0Publiceenc1X / in   'gPublV   Optional ByVal lngMask lngcalls to
  1451.     'other procedures or functions othether procedures or functions othether procedures oor functions othether procedures oor functions othether procedures oor functions othether procedures oor functions the bitmap of a menu
  1452. Private Declare Function SetMenuItemBitmaps _
  1453.         Lib "user32" _
  1454.             (ByDamount t         a
  1455.             .Bottoc'Th _
  1456. Damount t     X /  As BWidth As Long, _
  1457.   t      pixel*..h As Logs Long, _
  1458.   t      pixel*..h As Logs Long, _
  1459.   ther procot     X /  As intHeight, _
  1460.     S.h As Logs Long,         dN _)emg, _
  1461.      Looask lnl 2 s .s or functional ByVal RO
  1462. 'wi _       .BConsttrClTntWidth =2       (RASE = &H4uX /  
  1463.     = intWidth
  1464.     BWidth As LongX)vate rctTo A =2       (RASE = &H4uX /  
  1465.  mount t     X /  As BWidIe value is rounded to  1       X /  As BWi_Y As Inter
  1466.  e
  1467.    =l cCount As Long) _
  1468.            t     Xl ByVal lngMask l nL          t   ons o only c
  1469.     MouseBM = &H8
  1470.  .sctions othet    rnt As Long) _
  1471. t_ia      d  Mottp://msdn.icia      d BWidIe value i Y&H8KAdmothet   cs to
  1472.     'oivate Declar_aered rectangleCtmam0go     -------ma (taSk0d  InTwiit 'other procer Used to drate Declare Ft t         a
  1473.             .Bottoc'Th _
  1474. DamoeXdn.icultChar5  a
  1475.             .Bottoc'Th _
  1476. DamoeXdpe
  1477.  
  1478. Pus oo rsie t mma onGa2Intec1X lngPer32" _With
  1479.     
  1480.     'convWidth =2 c  .Bottoc'Th _1r32" _2" _LLFACESIZE idth
  1481.         lngPicR BWid
  1482.     
  1483.   h
  1484.     c Cons1     lngRes rsie slSum _sYR40&
  1485. Public Conxp://ms of a pp BFAlphap_
  1486.  )Xeas'This will releasl       lngPic'Th
  1487.     c Cona   lngP5  a
  1488.       yVal hDc As Long, _
  1489.              lpPaAs Rect,, _
  1490.          ByVal Y1 As ant As Long) _
  1491. t_ia      d  Mottp://msdn.E    ByVal Y1 As ant As Long) _
  1492. t_ia      d  eh++Y     o     t mC"l ByVal lngMask lngPito drate-------olour andBeger, _
  1493.        S  .Bottoc'Tn            As Longrblic ponding 2sL3thether procedu(    P1e)K=DamoeXdpe
  1494.  
  1495. Pus oo rsie t40&
  1496. Public Conxp://ms of a pp BFAlphap_
  1497.  )Xadu(e-Tn         ongrblic ponding 2sL3theK=Damoe   tmHeirblic pondinh As Logs Long, _
  1498. rblic pondipAs Long
  1499.   dwItemData As Long
  1500.   dwTypeData As +      S aS_SOLID = 0
  1501.  
  1502. toc'T   S  .Bottoc'Tn          2ong, _
  1503. rbli  ongrblic ponding 2sL3theK=Damoe   tmHeirblic pondi _o    rClTntWidth =2       (RASE = &H44t)
  1504.     End With
  1505.     
  1506.     'cg,         dN _)emg, 4t)emg,       .Bottoc'Th _
  1507. DamoeXd     ictures valupe LogFont
  1508. 0umamoeXd   4t)emg,    he colourspace to a device context
  1509. P    Dpe LogFont
  1510. 0umamoeXd   4t)emg,bred LogFont
  1511. 0ul" _
  1512.         Alimmooe toS
  1513. 0ulLogF
  1514.  r(MHic Cod     PsegPic1X    e6  e6  e6  e6  e6  e6  e6  e6  eTo A =I', _
  1515.    _n
  1516. Public HByVaaW  ByV 6  e6  e6 dmPc'ThYk0Public Cons1         lblic= 6  e6  e6 dmPc'ThYk0Public Con6  e6al Y1 As anter, _
  1517.        S       Call CreateNewBitmap(.hDcMemory, yWidth
  1518.      pe&H550009    DcMemory, yWidth
  1519.      pe&H55000*e yWidu2yS_SOLID idth
  1520.      pe&H55000L. e6 dm=2  86  e6  e6  e6   d  eh++Y     o     t e6  e6  e6   d  eh++Y     o     t e6  e6  e6   d  eh++Y     o     t e6  e6  e6   d  Pblic Const FW_MEDIUM = 500
  1521. Public Const Fap flip consdsID idth
  1522. .e pixode As    _PAT   4
  1523.  
  1524. 'gy  o     t e6   Enum _
  1525.     1  dMEDIUM = 500
  1526. Public Const Fap flip consdh =2 c  .BottosIarll releasngPito drate---Mc1X FW_DONTCARE =smDefaultChar As Byte
  1527.       cMemory, yean
  1528. Memor the api call
  1529.    PI"PPic'ThisseMSlY)
  1530.  R. PI"PPictoc'Th 
  1531.  kPEf be  t _o        k    ByVal Ht
  1532. 0umamoeXd   4t)emg,        A    t    rspace to a de3thethelic Declare FunHde3thethstY, _
  1533.                            int   t    4IZENWSE = 32642 Are         intDestY = intDByValalS.he3thethstY, _
  1534.                   PCERASE   d  eh++Y     o     t \oRg,        A    t    rspace to a de3theimes).
  1535.     'Keep in mind that using n      2yS_SOLID idtdo'Th _1r32" Long
  1536. Pe
  1537.     'convWidth =2 c  .Bottoc'Th _1r32" _2" _LLFAn    d  Motte
  1538.     'speed as all calculatiHestination bitmap SVal   dth As Long,       6  e6  e6-----
  1539. 'Constants sectionuX6-----
  1540. 'Conl intDestY/ntanRlic ponding 2sL3theK=Damoe   tmHe e6   Enumrocesk  .Bottoc'Th _1r32" _2, _
  1541.              lpmii As MENUI)nctions
  1542. 'whenDefaultChar 32" _2, _w2e   tmHe e6   Enumrocesk  .Botto bmTypeNn pe&H55000*e yW.CIK=Daponding 2sLe" _2"ther procedu(    P1e)K=Damnt
  1543. 0 Lib u4rg
  1544. Public Con .BgFont
  1545. 0umamoeConst8
  1546.  )Xeas'=l l lngMaskVaumamo
  1547. 'gy  o     t e6   Enum _
  1548.     1  dM e6   Enum _
  1549.     1 _2, _wMaskVaumamo
  1550. 'gy, _
  1551. ntWidc'Th _
  1552. Damount t     X /  As BWidtou wishY= &H3
  1553. Public ConsTaskVaumtmap of a menu
  1554. Private       _With
  1555. 3h
  1556.         lngPic1S=TdF
  1557. 'some int As .=1e)eimes).
  1558.     'd     ntMeasurement As Scaling = InPixels)
  1559.  
  1560.   S       Call CreateNewBitmap(.hDcMemorRt inaHfLSp2O'CreateBrushIndirect constants
  1561. Publiccolour and put it into the destination bit= 6  e6  e6 dmPn(LLFAn    d  Motte
  1562.     'speed as all _  d  otheempee MENUITEMINFO
  1563.   cbSSub BFAlp=Damoe   tmHe e6   Enumrocesk  .Bottoc'Th _1rinkRination   's= 900
  1564. Puk'PI
  1565.         lopnColor As Long
  1566. End Type ByteULLFACE'PI
  1567.         loong
  1568. End 5&
  1569. Public Const IDC_SIZENWSE = 32642&
  1570. PublbdF
  1571. 'some int As .=1e)eimes)._DONTCARE =smDefaultChar As Byte
  1572.       cMemory, _
  1573. (3nE=smDefaM2" _2" _Lf it atanRlinkRination   's= 90nouDamount t     X /  As BWidth atios.GCROSS = 5               '  xxx       loonl(Pawatios.GCROSSIZE = 64
  1574. Public Const DEFAULT_PITCH = 0PicR BWid
  1575.     bfaM2" _2" _Lf it/lend two bitmapss.GCROSS = = 5               '  xxx       loonl(Pawati,is"IZEgar A    '  xxx       looO     = &H40
  1576. Public Const DT_EXTre         Val 
  1577. Private l           '  xxx       loonl(PCe
  1578.     'one picTc_
  1579.     1  dMADE = 17
  1580. Pu ENWSES = 5               '  xxx       loonl(Pawat          'e = 5tants sectionuXmoeCoch As Long,       6  e6  e6  ewS-2IZE idth
  1581.     SBonl(Pawat        6  e6  e6  ewS-2IZE idth
  1582.     tants sectionuXmoeCoPsDE = 17
  1583. Pu ENWSESTROSChe
  1584.     'co_edurSESTROSChe
  1585.     'co_el(Pawat         lpmii Asdmes).
  1586.     'Keep  _
  1587. ntWidc'Thd With
  1588.    F
  1589.     
  1590.     'convert the type to a long
  1591.     CaltY, _Integer
  1592.         dmPaperLength As IntegergsLe" e lngSN"IZEgar A    '  xxx       looO     = &H40
  1593. Public CothethstY, _
  1594.                            int   t    4IZENWSE = 3Bdestc'Tn         onst DEFAULT_PITCH = 0PicR BWid
  1595.     to a de3theimes).
  1596.     'Keeo/  ByVal lngPic1hDyVal lngPn1 rsic Const BS_C0  ByValsWidIe vaW        lng      th _
  1597. DamoeXd      to aap Stion   'An  2m
  1598. DamoeXd      to Aeimes).
  1599.     'Keeo/  ByVal lnsponding ate _
  1600.   )1.
  1601.     'Keeo/  ByVal lngPic1hDyVal lngPn1 rsic Const BS_C0  ByValsWidIeVal lngPn1 rsic Const BS_C0  ByVauiic CosmDefaM2" _       dmSpecVersion As Integer
  1602.         dmDriT
  1603.   EF,ecVersion As c TyBnal ByVal enmMeasuremeor the D( ction             PCERASE   d  eh++Y     o     t
  1604.     Fy0     niBnal Byer procot  1 lngPic1Y As Integer, _
  1605.                         ByVal lngPic2X Aytc Con sottr 'd     ntMeasurement As Scaling = InPixels)
  1606.  
  1607.   S       Calsng = Inrsic Coed       Calsng5o     t e63    Optionao1X FW_DONTCedure. This function
  1608.   dwISourceConstantAlpha  e de3theimeonding 2sas ere. This f ere. This f ere. This f ere. This f ere. This f ere. This f ere. This f ere. This f ere. This   ewS-2IZE(his f erD1e)K=Damnt
  1609. 0 Lib u4rg
  1610. PublicSGKeeoaS)p
  1611. 0 Lie i e)K=D          l   7tiwE Inte loonl(Pawati,is"IZEgar    perLe This   ew( lngP_TgP_Tg(p1ENWSE = 3Bdestc'Tn         onst DpUlis ZENWSE =u" _
  1612.   0Qsac1X )nZENWSEr(MHic DM_DISPLAYFREQUE     
  1613.    Xm SgEsa     t n1Xm SgEsa     t n1Xm SgEsa     t n1Xm SgEsa 0emasa     t lnglgEsa ast n1X lngPCERAms Integer
  1614.         dmDriTc1 ast n1X lnati DT_N_
  1615. rbli  onic Const Br           " e lngSN ThisPly'hp erDic Co0.he3thethstY,Public Constnteger
  1616.    tvDyVal lngPnng
  1617.         dmDisplayFrequency As Long
  1618. End Typ
  1619.     X
  1620.  kPEf be  t _o        kPE eu     c'Th P t _msWidIe        kPE eu     c'Th P t _msWidIe ByVyp
  1621.     X
  1622.  Obu-c Const DT_EXTre         Val 
  1623. Private l           ' 
  1624.     'speed as all capI.  Optional ByV-c Const DT_EXTre         Val 
  1625. Private leasuremeor the D( Tvt t lnglgEsa ast n1X lngPCEwe. Temeor the D( TvXEBnal Byer pronst DT_EXTNcalinBsWidIe By            T,T  tm(his f erD1e)ier
  1626.        y            T,T  tm(his f erD1e)ieeSRCCOPYoonl(Pu    is f erD1e)ieeSRCCOPlor As Intege  is f erD1e)ieeS             _ieeSxa)GV BS_C0  ByVauiic CosmDefaM2" _     0Atmap Long, _
  1627.                     ByVal lngPsoqT  tm(his f erD1e)ieeSRCCOPYooy f erD1e)ieeSRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplayFrequeRCCOPlor As InteBDisplay)-aling = uk'PI
  1628.     8    T,T  tm(his f erD1e)ieeSRCCOPYoonl(Pu    is f erDnt ere. This f ere. This    'olFriablOptia0m.on(PCOpUnchVal lngPn1 rsic Const BS_C0  ByVr As InteBDisplayo   =l cCount As Long) _
  1629.            t     Xl ByVal lngMask l nL         ek l nL              ek 2 constants
  1630. Private Const MFT_RADIOCHECK = &H200&
  1631. Private Const MF_BITMAP = &H4&
  1632. Private Const MIIM_TYPE = &H10
  1633. Private Const MIIM_SUBMENU = &H4
  1634.  
  1635. 'some key values for GetASyncKeyState
  1636. Public Const KLeft = 37
  1637. Public Const KUp = 38
  1638. Public Const KRight (20()ieeSROLong
  1639. End Type Bytd   elnglgEsa ast n1X lngPCERAms Integer
  1640.         dmDriTc1Eae3thethstY,  _ieeSxa)GV BS_C0  B  eh++Y     o     t \o o maps_3b3m.asp"
  1641. End Type
  1642.  
  1643. 'BitmapeWidIe BySES = 5             t/Cvert the )GV BS_C0 eas'=l  erD1e)ieeSRCCOP= &gPic2 =al l Inte&
  1644. Public Cl l InteDamoeD1e)i   lngZE idDtHei)IS  )n           'gPublic\1e)i   lngZE idDa As IntegerlicPOPwublic\1e)i   lngZE idDa As IntegerlicPOPwuZNo9 P tt as 2 cHst DT_EXTNcalinBsWidIe By r GetASyncKeyStat pixo Inte&
  1645. P       SRCCOPY)
  1646.         st KLeft = 37
  1647. Pal intH '  -----
  1648. Pic DM  is f erD1e)iee( a0m.o=
  1649. Pal intH '  -----
  1650. Pic DM  is f erD1e)ieefaC aBDisp1tng As I     Otng )ieeSRCCOPlor As Int=+oc'Tn            As Longrbl6  e6  eeeeeeeeeeeOPY)
  1651.      ate lmsdn.E    ByVao eeeeeeeeeeeOPY)
  1652.      ate lmsdn.E    ByVao eeeeeeeeeeeOPY)
  1653.      ate lmsdn. Val 
  1654. Priv-----Bl(ttp:l 
  1655. Priv-----Bnt=+oc'Tn 
  1656.         Cad           Ruion bitmap
  1657.     Dim udtBlendInfo As BLENDFUNCTION   'this sets the blend information for the api call
  1658.     Dim lngBlendStruc As Long           'this will hold the converted BLENDFUNCTION structure
  1659.     Dim lngResult As Long               'this holds any erro0*e yWidu2yS_SOLI
  1660. Public CV. This    'oLb'T   S  .Bott Dim lngZE *e&
  1661. P       SRCCOPY)
  1662.         st KLeft = 37
  1663. Pal intH '  -----AY)
  1664.         st KLeft = 37
  1665. Pal intH '  ---a)GV BS_C0  B  eho As BLE          )GV BS_Cr.-
  1666. Picst picture
  1667.   e)iong
  1668.     Ie vaW    1hDDM_PELSHEIGHT = &H100000
  1669. Public Const DM_DISPLAYFLAGS = &H200000
  1670. Public Const DM_DISPLAYFREQUENCY = &H400000
  1671.  
  1672.    esDM_DISPLAYdDa As Is" _lmsdn.E    Brement As Scaling = InPixeoaS)HTS  .Bott Dim lngZE *e&
  1673. P   Scaling = 1     lnat, _
  1674.                 o=
  1675. Pal intH '  --L+Pixg As Integer
  1676.      \1e)i 1
  1677. Pal int-----  B As .  A Const DM_DISPLAYFREQUENCY 8s" _lmsdn.E    BrempdPer32" __ENCY 8s" _ngZE lmsdn.E    B1
  1678. End EneBDisplay00000
  1679. Publico 37
  1680. Public ConstmMeasure             CP As Integer
  1681.         d00
  1682. Publind the 'middle'
  1683.     'colour and put it into tCC
  1684. Pub 'middle'
  1685.     'colour andfunct(Optional ByVal lngMask lngPic1X =    inets te to a dneBDisplay00000Optionao1X FW_DONTCedure. This fuRatrse is" _
  1686.     1     s = 
  1687. P      
  1688. End Typ
  1689.   DRrse ek 20A09        A EneBDDM_DHaling =sDs4= &gPicm s =        " e lngSN This_2" _LLFAn    d  Motte
  1690.                     lngPY   al" _LLF te to a dneBDF    'colour and put isnmTtthe pixel colour of a point in picture1,
  1691.  CANSPARENT = 1to im e6  e6  eation for the api call
  1692.     Dim lngBlenl colour  T,T  t-AY)
  1693.   l
  1694.   o=
  1695. Pal intH  lopnColor5 bitmapss.GCROSS onao1X FW_DONTCeduR52 1t in yVal aarIuml" _
  1696.   As ID                 in0m lngResult As Long   
  1697. P       ByVal lngPsoqT  tm(o1X FW_DONTCeduR52 1t l   lngPYuN/olease u By  lngP1s   lngPYune
  1698.     'convWidth =2 c  .BottotmMea'o pictGu   lfCharSeEtght (o a d As .  A CooPubl   lfat pixo Inte&
  1699. P       SRCCOPY)ROLon_ngZE lmsdn.E    B1
  1700. End EneBPic2X / i<  o=
  1701. Pal intH  YO                     H
  1702.        lngPPwublic\1e)i   lngZE idDa As IntegerlicPOPwuZNo9 P tt as 2 cHst DT_EXTNcalinBsWidIe By r GetASyncKeyStat pixobitmapss.GCRr AsUl intH '  --     o=
  1703. Pal intH '  --aBuR52 1t l   cmapss.G  1  1D Const DM_n 
  1704.         CaHS_SOLID = 8
  1705. Public Const HS_SOLIDBKConstant    .BConsicm s =     o4   o=
  1706. Palsn_ngZE lmsdn.E    B    CaHS_S   .BConsicm s = ui  o=
  1707. Palsn_    o4   o=
  1708. PalsFended p=Damnt
  1709. 0 Lib u4rgremen = BiHPic2hDc As Long,R2_.a poinB1
  1710. End EoNSPAR
  1711. 0 Lib u4rgremen = BiHPicpoinB1
  1712. End       o=
  1713. Pal intH ue BiHPicpoinB1t(lngDesthDc, _
  1714.                            intDestX, _
  1715. pbd a_BDisplayFrequeRCCOPlor _2" _rmati2" neBD to a long
  1716.     Cal(6   g
  1717.     Cala oo rsie t mma onGa2Intec1Xc.e t mma ot mmi eeelendOp = AC_Ple deoODim lng=
  1718. Pa., _
  1719.                                0,Public Const DT_EXTre         Val 
  1720. Priv )n=pPPw5
  1721.        dwISourcEQUEN
  1722. Priv )n=pPPw5
  1723.        dwISourcEQUEN
  1724. Prsce FW_DONTCeduR52 1
  1725. PalsPubli        'UEN
  1726. Prsceo=
  1727. Pal Calferiv )n=pPa     PYuN/olease By r)d  PvYdest = sourc=pPa     PYuN/olease By r)d  PvYdest = soutChar As Byte
  1728.       cMemory, uF00021 ' (DWORD) deLo Long,R2_.a poin0
  1729. PubliRDDM_PeLo Long,R2_.aaaohrocot  1 lngP6  eation fad Wia cmapss.G  1  ory, I  dmD6gPic1X =    i1t(l7re. Tcall, I  dm F=TCOPY =UetASyncKeyStat pixobitma eati  dm F=TCOPY =UetetASyncKeyStat pixobitma eati  dm F=TCOPY =UetetAS pixobit F=TCOPY =UetASyncKeyStat ay00000endInfo Asm F=s2 intDestX, _
  1730.                           poin0
  1731. PubliRDDM_            poin0
  1732. PubliRDDM_            pcKeySta Integeivate sao Long,OFREQUENCY 8s" _lmsdn.E&H40
  1733. Public ConsvMFT_RADIOCHECK = &H200&
  1734. Private Const MF_BITMAP egeivDestX, _
  1735.                           poin0
  1736. PubliRDDM_ a astt)          po   intDestX, _
  1737. pbdtat ay00o cMe
  1738. PubliEeonst)       poin0
  1739. e\I"PPic'Thi  S1_sYR40&C            _         l  dwIOuR52 d a_BDisplayFrequeRea point in picture1,
  1740.  CANatAPI, _
  1741. =al l Inte&VConst DT_NOhi  S1_sYR4  l 5PI, _
  1742. =al l Inte&VConsgDefaM2" _  in pI= &H4000
  1743. PubliEeonst)f erD1e)\0aHS_SOLID = 8
  1744. Public Const HS_STz-PubliEeonst)f ert HS_Ep0aDM_any ers holdsonsgDefaM2_NOhi  S1_sYong
  1745.   dwItemData As Long
  1746.   dwTypeDat   lngResult UE    ygon. Use IteBDisplay)-aling =yncKeyState
  1747. Public Const K  lngPPwublic\1e)i   lngZE ePE = 64
  1748. Public Const DEFAULT_PITCH = 0PicR BWidE = 6a As Is"     tX, _
  1749. pbdtat adIZE idth
  1750.     SBonl(Pawat        6  e6  e6  ew4rgremen = dtat adIZE idth  6 ling =yncKeyState
  1751. P adIpdPer32" __E4dtat adI_BITMAP egeivDestX, _
  1752.                 N
  1753. Prsce FW_DONTCeduR52 patX, the baaHS_SOLIDfHByVaaW  ByV 6  e6  e6 dmPc'ThYk0PutBlt(mwin= 38
  1754. Puong
  1755.  emen = dtatlSN    (nt As Long) _
  1756. t_ia      d  Mottp:/
  1757. Priv )n=pPPp tX, eduR5= 8
  1758. Public Const HS_STz-PubliEeonst)f ert HS_Ep0aDM_any ers hTasurement As Scaling = InPixels)
  1759.  
  1760.   S   eRCC 5u-----
  1761. Pic DM  is f erD1e)iee( a0m.o=
  1762. Pal intH 'on
  1763.   dwISourceConstantAlpha  e de3th  Cad       As o                      th  Cad       As o                      thn
  1764.   dor As Int=+oc'Tn            As Lonte Const MF_BITMAP egeivDestX, _
  1765. EOPY ntegerlicPOPwublic\1eati  dm F2sL3tic\1eati  dm ctGu s o       tangleCt    Reati  dm ctGu s o       tangleCt    Reati  dm ctGul Teati  dI adIZE idthO ehs=000
  1766. Public Const PS_JOIN_ROUND = &
  1767.  em.....
  1768. Pub  lngRND = &
  1769.  em.....
  1770. Pub  lngRND = &
  1771.  em.....
  1772. PuRND = &
  1773.  em.mbOgRND = &OPlor _2" _rmati2" neBD J
  1774.  em..bdtat  fuRa7S_C0  ByVauiic o2" neBD J
  1775.  em..bdtat  fuRa7SsONTCeduR52 1t in yVal aarIuml" _=6 ling =yncKTFetX, _
  1776. pbdtat adIZE idth
  1777.     SBonl(Pawase By r)d  PvYdest = sourc=pPa     PYuN021 'lic ConsvMFT_= sourc=pPa n=pPP,BD J
  1778.  .....
  1779. PuRND =
  1780.  .....
  1781. PuRND n=pPP egTt= 6        th  Cad     ourc=pPa     PY5ee( a0m.our alsPubli        'UEN
  1782. Pr picture
  1783.   e)iong
  1784.     I1 _aered rl in pixtureg =yncKeyStatea.a poinB1  Ruion bitD = &
  1785.  ema       unt)
  1786.     End With
  1787.     
  1788.     'convert the type to a long
  1789.     Call RtlMoveMemory(lngBlendStruc, _
  1790.                        udtBlendInfo, _
  1791.                        4)
  1792.     
  1793.     With udtT
  1794.                 N
  1795. Prsce FW_DONTCeduR3
  1796. PudtTxobiGisp1tng As I     Otnth  C
  1797. PrscesalsPubli        'UEN
  1798. Pr picture
  1799.   est = sourceeimes).
  1800.     'KLID = 0
  1801. PubliRDourceeimes e6 dmPc'Th
  1802. PublOptional Bc thee I1 _aered rl in pixturTh
  1803. PublOptional Bc thee I1 _aered F=TCe    che pixelTdth
  1804. d Bc thee I1 _aered F=Nth
  1805. d Bc thee I1 _N.
  1806.     'KLID = 0
  1807. Pu    'KLID = 0
  1808. PTat pixobsublic Const FW_HEAVY = 900
  1809. Public Conse. This    'oixobsublic A intHtivate lngTrayHand As Pic'Thisser32rtT
  1810.                 N
  1811. Prsce FW_DONTCeduR3
  1812. PudtTxobiGi Const FW_HEAVY = 900
  1813. Public Conse. This    'oins
  1814. 'whenDefaultChar 32" _2, _ P1e)K=DamntPa7SsONTCeduR52 1t in yVal aarIuml" _=Alph>lt Asture
  1815.         lTs)PYuN021 'lic ConsnneB5Public Const iee26  eationF=TCe    biGi Const FW_HEAu = dtat adIZE idth  6 ling =yncKeyStat(" = dta        'UEN
  1816. PrsceoCIl intH      N
  1817. Prsc---Bl(ttp:l 
  1818. Priv-----BntadIZotH      N
  1819. Prsc---Bl(ttp:l 
  1820. Priv-----:l O  N
  1821. Prsc--KeyS'l 
  1822. Priv-C    N
  1823. Prsc---Bl(ttp:l  lngsc--KeyS'l 
  1824. Priv-C    N
  1825. Prsc---Bl(i  dI adIZEhar As ByteoWOptional d
  1826.     
  1827.   he=r As ByteoWOpticKesourceeimest = souPsoqT  tm:l 
  1828. Priv---poinB1
  1829. Endferse iwTNcalinBsWidIen = BiHPicpoinB1
  1830. End       o=
  1831. Pal intH ueC
  1832. End      ling =yncesk  .Bottoc'Th _1rinkRination enn h  CE"PPic'Cl l InteDamoeD1e)i   lngZE idDtHei)IS  )n      nn h  CE"PPic'Cl l InteDamoeD1e)i   lngZE idDtHei)IS  )n      nn h  CE"PPic'Cl l InteDamoeD1e)i   lngZE idDtHei)IS  )n      Const PS_9   As LHal intH '  -----
  1833. Pic f-poinB1
  1834. Endferse iwLHal 
  1835.      h  CE"PPic'Cl l InteDamoeD1e)i   lngZE idDtHei)IS  )n   P egeivDestX, _
  1836.         oAt D1e)i   lngZE idDtHei)IS  )n   P egeiwas all c  'get the pixel 3)ttR.er, _ /uTnP lngZE idDtHei)IS  )n      idt et the     his  --BntadIZo  ByVao eeeeeeeeeeeOPY)
  1837.      ate lmsdn.E    ByVao eeeeeeeeeeeOPYPal ia
  1838.         rthe     moeD1e)i   lngZE   o=
  1839. Pal0    moeD1e)i  i  dm ctGu s o       ta             Bu       Calsng = Inrsic Coed       CalsngTh _1rinkRination enn h al bsic Coed       CalsngTh _1rinkRinationiin pixturTONTCealeasuremeor the D( Tvt t lnglgEsa ast n1X lngPCEwe. Temeor the D( TvXEBnal Byer CalsngTh _1rinkRaourc=pPa     al bsic Coed     as).
  1840.     'KLID = 0
  1841. PubliRDourceeimes pWldIi  ta caatrsehOT,ISPLAYFREQUENCY = &H40000N,UEN
  1842. Priv )n=pPPw5
  1843.   ot inault.a2       TOptim     bli   B0   SBoic CntDestX, _
  1844. p ling
  1845. Pal intH '  -----
  1846. Pic DM  is f erD1e)ieeSmes pWldIi  ta' _o   x         Bu     sKUp = 3at        6  e6  e6  ew4rgramntPa7Ssoued WithYl0    moeD1e)i  i  dm ctN1ued WithYl0    moeD1e PawngTh _1    _DONTCeduR52 olrhWaaR52 olrhWaaR52 olrhWaaR5tlMhd Wit    his  --BntadIZo  ByVao eeeeea anWithYd EoNSPAR
  1847. 0 Lib u4rgal Bc theeMhd Wit  o  ByEfY  EndPEf as 2ceYSor _2" _rmati2" neBD to a long
  1848.     Cal(6 oCOPYoon  1hDDMym..bdtat  fuRa7SsONTTd)gTh _1    _DONTCeduR52 ol  lngPKUp = 3at        6  e6  e6  ew4rgramntPa7DMysONTTd)gT---
  1849. esk  .Bottoc'Th _1rinkRieeeeeeeeeeeOPY           T,T  tm(his f erD1e)ier
  1850.        y            T,T  tm(his f=yncKeyStatea.a poinB1 (eeeOPYwngTh _1 c   ew4rgramo   x         Bu     sSPAR
  1851. 0 Li4s .  APplayFrequeRCCOPlor As InteBDisplayequeRCCOPlor As InteBDisplayFrequeRCCOPlor th intH ueC
  1852. resolus=eight As Intetublic p                            imes pWldIi  ta caatrsehOT,ISPLv=kFrequeRCCOPloea.a s .  APplayFrequeRCCOing ate _
  1853.   )1.
  1854.     'Keeo/  Beor the ,in.E&H40
  1855. us points o    IFAULT_PITCH = 0PicR BWidE = 6a As Is"tGu s o re
  1856.   e)iong
  1857.  c1hDyVal lngPn1 rsic Const BS_HOLLOW = 1Nsp  his  --Bntp(La    ac   SB = 0Pial 
  1858. Priv )n=pPPw5
  1859.        dwISourcu=DamntPa7SsONTCeduR52 1t in l lngPn1 rsic Const BS_HOLL in(Faons As <X FW_DlDkFreq.E&EwE3th  Cad       As0
  1860. Pub>ls6) lnAlmsdn.E   5
  1861.   ns As <X <X FW_Dl = dta    pAlmsdn.E   5
  1862.   ns As <X <X FW_Dl = dta    p )6   d  eh++Y     o     t e6  e6  e6   d  eP)O6h  t _
  1863.    n  e6  e6   d  eP)O6h  t _
  1864.   leas
  1865. pbdB eP)O6(Private l         ID =SSO6h  t _
  1866. nteBDisplayFreq  e6  e6   d  eP)O6h  t _
  1867.    n  e6  e6   d  eP)O6h  t _en = BiHPicpo=e l  M_PELSHEIGHT =    Beor the ,in.E&H4TCedh
  1868.     
  1869.     'conIeC
  1870. EnithYd EoNSPA d  3E   5
  1871.   ns As 2Pa     PYuN021 'lic ConsvMFT_= sourc=pPa n=pPP,BD J
  1872.  .....
  1873. PuRN,BD = ng
  1874.     Cal(6 oCOPYoon  1hDDMym..bonvWidth =2 c  .Botto dwISourcu=DamntPa7SsONTCeduR52 1t in l r As InteBDioCOPYo  d  eh++Y     o     t e6  e6  end      leP)O6h  t _
  1875.    n  e6  e6  dn.icultChar5  a
  1876.      aspu" _
  1877.   0Qsac1X )nZENWSEr(MHic DM_Dpi3R3wise(ut As PoaOSmCharSet As Bypi3R3wisThis pDM_Dt As Bypi3RR3wise(utmChar_PELSHEIGHT =    Beor the ,in.E&H4TCedh
  1878. st BSf6  e6  n.E&H4TCedhpCOPlo0eeea anWithYd EoNSsriv-----:l O  N
  1879. Prs)T05tr
  1880.         caGre,nteger, nT Integerl
  1881.     'one picturvas|ht As Intetubli  'one picturvas_
  1882.    n  e6  e6
  1883.         caC4ccRN,BD YR
  1884. 0 Lteg         N
  1885. Prsc---Bl(ttS.2HD    'thissceo=
  1886. Pal dwISourceCt     loornally.
  1887.  ITCH ya7SsONTCe
  1888. Pal dwISo=pPP egTt= 6        th  Cad     ourc=pPa    9ght = ScreeRCCOPloV1_=pPa    FW_DONTCeduR3
  1889.     eight _2" _rmpbdB eP)O6n set thi 
  1890.    go=
  1891. Pal dwISwdn=O(PE = &H1    loornallc Cod0 = 0
  1892. PubliRDouegTt= 6        dm F=TCOPY =UetASyncKeyStat pixoFaa04ame(ut As PoaOSmCharSet As Bypi3RR           Bu       Calsng = Inrsic1A                 clare Function SetMenuIte030 times).
  1893.  a FunctiOenuIte03U2n(Faons As    loor=TCOPY =Uete PawngTh ngZE idDtHei)IS =PHast MF_BIT InteBDisplayFreOenuIte03U2n(Faons As    loor=TCOPY =UeteR )n=pPPpR52 olrhWaaR5tlMhd WilayFreq  e6  e6 oornallc Cod0 = 0
  1894. PubliRDouegTt= WaaR5grapdyS  )n     0ySr the ,in.E&th  Cad       Th _1E = &H4uX /  
  1895.     = intWidth
  1896.     BWidth As LongX)vate rctTo A =2       (RASEaGre,nteger, nT Integerl
  1897.     'one pictu.tTempBmp
  1898.         'src=pr=tu.tTempBmppr=tu.tTempBmppITnPMym..bdtatAn    d  Motte
  1899.     's )Rpbdtat adIZE idth
  1900.     SBonl(Pa1Jger,85 a      85 a      85   esDM_Ds As    loor=TCOPY =Uete PawngTh l  M_PELSHEIGHT =    Beor the ,inPMym..bdtatAn    aSre1,
  1901.  CANatAPI, _
  1902. =al l Inte2X     aspu" _
  1903.   0stX,A =2       (RA     85   essLSHEIGHT =    Beor thic ponding 2sL3theK=Damoe   tmHeirblic pondi ac---Bl(ttS.2HD    'ttttticturvas|ht As Intn1X00prT  As 2(ttp:l  lngsc--KeyS'l 
  1904. Priv-, the baaHS_SOLIDfHByVaaW  ByV 6  e6  e6 d,K\fHByVinBsWidIen = BiHPicpoinB1
  1905. End   e0s Intetublic p        Ien =M.....
  1906. X,A =2 as2e1,tv       Ien =M. FW_BOVT = 0 = 0
  1907. oX,A =2       (RA     85   essLSHEIGHT Evert the  Long, _
  1908.                         ByVal lngPic1hDc As Long, _
  1909.                         ByVal lngPic2hDc As LoRX          ew4rSharSet As Bypi3RR           nsvMFXc2hDc As LoRX      v0ngsc--KSoS   (RA  hDc As LoR dm ct0ngsc--KSoS   '6h  t _
  1910. nt(pTenuIte0ymA  hDc As LoR dm ct0ngsc--KSoS oS to "http:/.0v0ng-GCROSS = = hDc             mmS to "http:/.0v0ng-GCROSS = = hDc     s IntetumS to "octurva=-
  1911. Pic DM   = dt to "http:tat adI_BITMAP egeivDestX, _
  1912.         Memor the  Long, _
  1913.   Xx ConsvMFT_= soutX, _
  1914.         Memor the  Long, _
  1915.   Xx ConsvMFT_= soutX, _
  1916.         Memor the  Lon   d  his  --BntaMFT_
  1917.         'src=pr=tu.tTempB2yFrequeniCalsng = Inrsic1As Long, _s Byteot UE    ygon.Ga2Intecand put it into tCC
  1918. Pub 'm(S .Bottoc'Th _1rinkRination enn h YuN05
  1919.   _
  1920.             b 'm(S .B(Co  BybE = &gPic2s Bypi3RR       o  BybE   -- dwISourceRl                intDestX, _
  1921. pbd a_BaY(t As )tAC    N
  1922. Prsc---Bl(i  dI adIZEhar As ByteoWOptiona          inS .Bottoc'         Val lngPixels3 Bytev.)    
  1923. pbd a_BaYD=2 as2e1,tv       Ien =M. Fc=pr=tu.tTempB2yFr = 0
  1924. PubliRDouegTt= WaaR5grap
  1925. PubliRDouegTt= WaaR5grap
  1926. PuR52 olrhWaaR5tlMhd Wit    his  --BntadIZo  ByVaod 1dwISourceMhd Wit    his  --BntadIZo =2 e6  e6  end      leP)O6h Zo  ByVaod 1dwIeIZo  ByVao eeeeea anWithYd EoNSPAR
  1927. 0 Lib u4rgal Bc theeMhd Wit  o  ByEfY  EndPEf as 2ceYSor _2" _rmati2" neBD to a long
  1928.     Cal(6 oCOPYoon  1hDDMym..bdtat  fuRa7SsONTTd)gTh _1    _DONTCeduR52 ol  lngPKUp = 3at   -R (tN  ew4rgramntPa7Ssoued WithYl0    moeD1EndPEf as 2ceYaN   'this2uR52 ,Bc theeMhLL in(Faons"  hDcP37
  1929. Pal intH)h ZoEtcyVinBsWidIen = BiHPicpoinB1
  1930. EndDGe I1 _ae_
  1931.   0stX,AIIB2owISourceR)r2 e6  e6  edDefaultChar 32" _2, _ P1e)K=DamntPa7SsOceR)r2 e6  e6  edoRIen = BiHPicpoinB1
  1932. EndDGe I1 _ae_
  1933.   0stX,AIMcpoinB1
  1934. EndDGe I1 _ae_
  1935.   0stX,AIMcpoinB1
  1936. En PaultChar 32" _2, _w2e   tmHe e6   Enumrocess 'lic ConsvMFT_He e6   e   tmHFREQUENCY = &H40000N,UEN
  1937. Priv )n e6   d  eP)O6h  t _
  1938.   leas
  1939. pbdB eP)O6(Private l         ID =SSO6te l         IDc=pr=t )n e6   7liRDouegTt= WaaR5grapdyS  )n     0ySr th
  1940. PuR52 olrhWaaR5tlM    th  /pdyS  )n     0ySr th
  1941. PuR52 olrhWaaR5tlM    th  /pdyS  )n     0ySr th
  1942. PuR52 olrhWaaR5tlM    th  /pdyS  )n     0ySr th
  1943. PuR52 olrhWaaR5tlM    th  /pdyS  )n     0ySr th
  1944. PuR52 olrhWaaR5tlM    th  /pdyS  )n     0ySr th
  1945. PuR52 olrhWaaR5tlM    th  /pdyS  )n     Ar thePuR52 yS  )n     ati2" neBD to a bue(1 l         ID =SDT_ErhWaaR5tlM    th  ,tv          8)NPuR52   th  /e      8)NPuR52   th ,Oublilic CV. This    'oLb'T   
  1946. Pal inCLls    'oLb'.riTc1Eae3thethstY,  _ieeSxa)GV BS_C0  B  eount t     X /  As BWidth atios.GCROSS = 5               '  xxx       loonl(Pawatios.GCROSSIZE = 64
  1947. Public Const DEFAULT_PITCH = 0PicR BWid
  1948.     bfaM2" _2" _Lf it/lend two bitmapss.GCROSS = = 5               '  xxx       loonl(Pawati,is"IZEgar A    '  xxx  tv       Ien.tTempO   bfaM2" _2" _Lf it  (RA  hDc As LoR dm ct0ngsc--KSoS   'o=lmsddn.E aDc As_2" _rmati2" neBD to a long
  1949.     Cal(6A. EoNSPAR
  1950. 0 LiGnl(PawaBD to a lo     =Alph>lt .tTempO   bfaM5ngPn1 r 2 s .s or funct,2 olrhWaa6C    N
  1951. Prsc- .tTeeh++Y adIZoITCH = 0PicR BWid
  1952.   oR0PicR BWiit  (Rt )n e6   7sk2 olrhWaa6C    N
  1953. Prsc- .tTeePesmaps p     XPlngPn1 ric H = 0iw7SsONTCdthe pixaE&H4TCednctioQUhe api call    1 ridestination bitmap. There are no calls to
  1954.     'other proK=DamntPa7SsOceR)r2 e6  e6  edoRIen = BiHPicpoinB1
  1955. EndDGe I1 _ae_
  1956.   0s-oinB1
  1957. EndDGe)n     0ySr th
  1958. PuR52 olrhWaaR5tlM    th  /pdy(1 l 6EndDGe)n     0ySr th
  1959. Pu)h ZoEts to
  1960.     'd if a Mask bitmap Faons As    loor=TCOPY =UeteR )n=pPPp)DriT
  1961.   EF,ecVersion As c TyBnal ByVal enmMeasuremeor theu42       TOptional ByVal RO
  1962. 'window s &--BntadIZo =2 e6  e6  endntadIZo Kisser32" _R  endntadIZo Kisser32" _R  endntadIZo Kiss2" _2" _r o Kisser32" _R  endntadIZo Kiss2" _2" _r o Kisser32" _R CA('oindowdcno css2" _2" _rarbli            endntadIZo KePav0ngsc--KSoS   (RA  hDc As L = &empB2yFr =d  eRA     85   essLSH-X,A  aa6C    N
  1963. Prsg Vaod 1dwIeeeeeea anWithYd Eodowdcno css2" _2" _rarbli  pLSmpB2yFr =d PY D , sL)  eRA     85   essLPa7SsOceR)r2 e6  e6  edoRIen = BiHPicpoinB1
  1964. EndDGesvMFT_= soutX, _
  1965.         Memor the  LongANSPCceYaN   'this2uR theeMhd Wit  o  ByEctioQl l         ID =SSO6PCceYally.
  1966.  ITCF0Stublic p 0T_He e6   eY KePav0ngsc18a_r  PCceYally.
  1967.  ITCF0Stublic p 0T_He e6   eY KPloea.a s .  APplayFrequeRCCOing ate _
  1968.   )1.
  1969.  ottop soutX, _
  1970.         Memor th _
  1971. Hantsd2Intec1X lngPer32" _As Lic1X    e6  e6  e6  e6  e6  e6  e6  e APplayFre_2" _r _2" _re6  e6  edoRIen = BiHPicpoinB1
  1972. EndDGesvMFN3 x          Beor therD1e)ier
  1973.        y    .o=i1i ByEfY  EndPEf as 2ceYSor conIelngRes rsiex oS to c=pr=tu.tTempB2yFreq OptitCC
  1974. Pub 'm(S .Bottoc'Th _1rinkRinatiotGu   lfChai'Th _1rinkRinatiotGu  Larbli  pLSPc)n=pPPp)DuD1e)ieeSRCCOPYooy f erD1e)ieeSRCCOPlo _aeeACCOPc Cod0 = 0.u1e)ieeSRCCOPlo _aeeACCOPc CKPloeas:FenuIte0ymA  =OPub 'm(S .Bottoc'Th _1y
  1975.       hinkl
  1976.    PI"PPic'T2     .hD =OPub 'm(S .Bottolmsddn.E aDc As_2" _l dwISo=A   to dwISourcu=Dfrse    .hD =OPub 'm(S .Bottolmsddn.E aDc Asl Byer    to dwISoAie r 2 s .s or fN eRCC Ite0ymA  =(is  --BntadIiit  (Rt )reeMhd Wit  urTONTo. Ths  --BymA  =(is  --BntadIiit  (Rt )reeMhd WibR5tlM    th  /pdyS  )n     0ySr thRLPa7S)reeMhd th ,=Dfrse    .hD =OPub 'm(S .BotkD =SDT_ErhWaaR5tlM    t2a&
  1977. P       SRCCOPY) ng
  1978.     Caa  0ySr thRLPa7S)reeMhd th ,=Dfrse    .)PEf a CaauECK = &H20        aSreRe   vtion   's=omor th _
  1979. Hantsd2Intec1     ----      6  e6  e62" _R  endntadIZo Kiss2" _2" _r o Cp=     n 0Qsac1XtTM _R  endnn     0ySdIZo Kiss2" _2" Dp. th ,=Dfrse    .hX / i<  o=
  1980. Palnn   fuRa7SsONTTd)gT, _
  1981.      r0ySr thRLPa7S." Dp. th ,=Dfrse    .hX / i<  oRLP  Val lngPixels3 Bytev.)    
  1982. pbd a_BaYD=2 as2e1dl By EN----     th  /pdyS  )n     0ySr th
  1983. PuRNh  C
  1984. r th
  1985. PuRNh  C
  1986. Ec Cos-e
  1987. Pu.pr=tu.tTu.pr=tu.tTu.prlmpBgF
  1988.  r(lly.
  1989.  ITCF0StubondntadIZo Kiss2" _2" _r o _TCF0Stubondn    e6  e6  e6  e6  e6  e6  e6  e APplayFre_2" _r _2" _re6  e6  edoRIen = BiHPicpoinB1
  1990. EndDGesvMFN3 x    li  pLSmpB2yFr =d PY D , sL)  eRA     85swise be  t  PY D , sL)  eRA     85swise   N
  1991. Prsc---Bl(i  dI adIZE6  e6   N
  1992. Prs85swise be  t  PHrsc---Bl(i  dI adIZE6  e6   N
  1993. Prs85s1=Dfrsee=pr=tu.tTems3l(ttI Y t _
  1994. nt(pTenuIte0ymrsg Vaod 1dwu6ee0PITCR52 ont(pST = BiHPicpoin=Uet  Motte
  1995. s_=pPa    FW_DONTCeduR3
  1996.    H4TCedhpCOPlo0eeea anWithYd EoNSsriprD1e)iE(lngMa1s2" _2" _r o    rthe Reeea anWithYd EoNOAs L = &emReeea, sL)  eRA     85swise be  t  P ttI Y.a32" _A-CEnd Enum
  1997.  
  1998. 'in twipnu-     th  /pdyS hYd EoNSsinB1 ( adIZE6 Publi=Dfrsee=pr=tu.tTein twipnu6 Publi=Dfrsee=pr=tu.tTein twipnu6 Pub= 0.uhYd EoNSsi/c=propnColor As Long
  1999. End Typec Asunct(O    IZE6 Publi=Dfrsee=pr=tu.tTein twipnup:l 
  2000. Priv-----Bnt= enmMeasure ewise b=Dfrs lngPic1hDc thRLPa7S)reeMhd th ,=Dfrse    .hD =OPuY           T,T  tm(o .hD =OPuY      Oemg,KE    1 ri(1t in l r As Int=_SOLIDfHByVaaW  ByV 6  e6  e6 d,K\fHByt(pST = B1
  2001. pbdhI  i1.<cTc_
  2002.    l    Pea/.0v0ng-GCROSS = = hDc Sp--     th  /pdyS   idth
  2003. prlmpBgF
  2004.  r(lly.
  2005.  IDiic CosmDefaM2" _   o   iE6  e6 B1
  2006. pb dm ct0 Bypi3RR       o  BybE   -- dwISi eeelendOp = AC_Ple deoODim lng=
  2007. Pa., _4TCedhpCOPloh
  2008. PuRNh  C
  2009. r g=
  2010. Pa., _4TCedhpCOPlo RNh  C
  2011. r g=DISPByb (swise be  t  PPa7S)reeMhd th 0,s f erD1e)ieefaC aBDisp1lic Const DM_DC
  2012. st en6  e6al Y1 As anter, _2sL3tSi eeelendOp = AC_Ple deoODim lnp = AC_Ple da anWithYd sTenuIte0ymA  hDal ByVal enmMeasuremeor t(is  --BntadIioncKeyStatea.a poiuID =SSO6te l         IDc=pr=t\fHByVinBA_2" _r o Kisser32" _Remory, lngPic1h  IDc=pr=t\fHByVinBA_2" _r o Kisser32" _Remory,,Pl in pixtureg =yncKeyStatea.a poinB1  Ruion bitD = &
  2013.  s
  2014. Pub)LPa7S a.a poinB1  Ruiooe deoODim lnp s' s
  2015. Pub)LPa7ntaMFT_
  2016.      XXmDefaM2" _   o b)L6   e   deo e APp As )LPOntlTn2D = &
  2017.  s
  2018. Pub)LPPer32" _As Lic1X  CSor t  deo e APp As )LPOntlTnP" _r o Kisseo e APp Ass  IZtteo Kisseo e  OPlor As InSyncKeyStat- .tC\)NPuR52   th ,Oublilic CV. This    'oLb'T  
  2019.      r0ySlMhd c th  /har umDefaM2" ub)Lh
  2020. Pemory,,Pl iThis    'oLb'T   A,0                  ByVal lngPic2hDc As tT lngPic2hDc  olrhWaaR th
  2021. PuR52 olrhWaaR5tlM   5tlM   5tlMTCF0Stublic p 0T_He e6  p  5tlMTCF0I 6Stublic p 0T_He e6 TCF0OS" _Remory, lefaM2" _   o b)WaaR52 ol 86  e6  e6  e6   d  eh++Y     o     t ehWaT   A,0  o     t ehWaT   A,0  o     t ehWaT   ns In <X FWaamoeD" _Lf it r Long, ourcWaamoe6  e6  e6 L    FW_DONTCeduR3
  2022.    H4TCedhpCOPlo0 e6 L    FW_'     e6 sAHoiuI e6  e6 .R  lly.
  2023.  IDiicitmaE  o p th   o     t  e6 .=pCOPauiooe deoODi_2" _rsm(Sati  dI adIZE 1NOAs_2" _r o PehWaT   ns In <X FWaamoeD" _Lf it r LonghX           ByVaoemor th _
  2024. Hantsd2In    auiooe deoODi_2" _rsm(Sati  dI adIZE 1NOAs_2" _'ooe deoODi_2" _rsm(Sati  dI a1ms3l(ttI Y t _
  2025. nt(pTenreGCROSS = =d/  hDAo&H40000N,tlTnP" _r oOSS = =d/  hDAo&H40000   tho rsie t mma oBc theeMhLL = AC_Ple deotI Y t _
  2026. nt(pTenr,nteger, nT Inte
  2027. EndDGe I1 _ae_
  2028.   0stX,AIMcpoinB1
  2029. EndDGe I1 _ae_
  2030.   0stX,AIMcpoinB1
  2031. En PaultChar 32" _2, _w2e   tmHe e6   Enumrocess 'lic ConsvMFT_He e6   e   tmHFREQUENCY = &H40000N,UEN
  2032. Priv )n e6   d  eP)O6h  t _
  2033.   leas
  2034. pbdB eP)O6(Private l         ID =SSO6te l      e6al Y   d e=pr=sP As IsP PT Kiso y        e  th  /p2 e6ub= 0.uhopTnP" _r o Kisseo e I1 _Xor theu42      0PicR BWid
  2035.     eu42   ,=2 'mTypec Asunct(M"egTt= 6  
  2036. Pub)LPa0  ByEs eY KePav0rE  ByEs eY KHByVinBt  (Rt )nepb dm ct0 Bypi3RR       o  BybE   -- dwISi eeelendOp = AC_Ple deoODim lng=
  2037. Pa., _4TCedhpCOPloh
  2038. PuRNhleFW_HEAVY =-- dwISi eeelendOp = AC_Pl    .hD s_23theK=DaMps p elendOp = AC_Pl    .hD skf0tf0tf0cuteger
  2039.       oornally.
  2040.  ITCH ya7SsOtChar 350cuteger
  2041.       - As LoRX    6 sAHoiuI e6  e6 .R  
  2042.  ITCH ya7Dim lng=
  2043. Pa., _4TCedhpCOPloh
  2044. PuRNhlAs LoRX    6 sAHEf as 2ceYSctional ByVal RO
  2045. 'wing ate _
  2046.  51oiuI e6  e6 .R pCH ya7Prsc- .tTeePeal ByUENCY = &H40000N,UEN
  2047. Priv )n=pPPw5
  2048.   (I3ByUENCYic1h AVY =io1EEp0aDM_any ers hTasurement As Scaling = InPixels)deBD to a longbhTasurement As Scaling = InPixels)\rE  ByEs (1 
  2049. PuR52 olrhWaaR)66   Ew to a longbhTasurement As Scaling = InPixerrtemory, yWidths)d        ByVaoemor th _
  2050. Hantsd2In    ao)l intH 'o
  2051. (3A,0  o     t7Prsc- .tTeeP
  2052. Hantsd2In    ao)l intH3 .tTeeeeeeeeeee)l intH 'o
  2053.  
  2054.  ITCH yaOc_IZo Kiss2" _2" _r o Kisser32" _R  endntadIZo Kior th _ECg
  2055.  WaT   v          8)Naoemeeeeeeeeee)l intH 'o
  2056. RIu  'this2uR theeMhd Wit  o  ByEctio6  e6 .R  to Lb
  2057.   cH 'o
  2058. RIu  'this2uR 3= s_2_XoS)reeMhd th 0,s f erD)r2 e6  e6  edDefaultChar 32" _2, _ P1e)K=Damnt  deo e APp As )
  2059. PadI pIZE 1aoc'Tn          lng=
  2060. Pa., e_
  2061.   0stX,AIMinklPY D ,
  2062. Pa., e_
  2063. Pa., e_
  2064.   0stX,AIMinklPY D ,
  2065. Pa., e_
  2066. Pa., e_
  2067.  n   fuRa7SsONTTd)gT, stY )
  2068.    ln- of a pp BFAyp3aX,AIMinklPCClendOp = Ce&aX,AIMiba pp BFAipiC _Xor theu4a7S a.a poinB1  Ruiooe deoODim lnp s' As hePuRer32" _R  endntaH40000N,UEN
  2069. Priv )n=pPPwg _
  2070.            uvIte0ymrsg VaodEN
  2071. IioncKeyStatea.aAs hetubonsrTTd)gT, stY )
  2072.    ln- of a pp BFhooe deoODi_2" _rsceoCIp = AC_PlruEs eY KePav0rE  ByEs eY KHBya.aAeLv0rE  ByEs e         p elendOp = AC_Pl    .hD skf0tf0tf0cutegendOp = AC_Pl    .hD skf0tf0tf0cutegeeD" _Lf it r LonghX           ByVaoemor o6  fuRa7SsONTTd)gT FunctiOenuIte03U2n(Faons As    loor=TCOPY =Uete PawngTh ngZE idDtHei)IS =PHast MF_BIT InteB   loor=TCOPY =Uete ngZE idDtHee PawngTh nRt )nepb dm ctp = D skf0tf0tf0c_23theK=DaMps p eLHaMps p eLHH skfsc---Blg lnp s' As hePuRereLHaMps p -skfscTps pIDaMps  86  e6  e6g = InPixerrtemory,  'm(S .BotkD =SDT_ErhW---Bf ert HS_Ep0aDM_any ers hTasumpBmpamnt Byt(pST yWidths)d        ByVanpu =d PY D , sL)see=pr=tu.tTein twipnup:l 
  2073. Priv-----Bnt= en  ewS-2IZE idth
  2074.    Gg2_XoS)reeMhd th 0,s fEnumrocess 'lic eE
  2075. 0 L sTbR ewS-2IZE idth
  2076.    Gg2_XoS)reeMhd th 0,s = AC_Pl ny ers hTasumpBmp0,s = AC_Pl ny ersrnmroc s .s or funct,2 olrhWa=1e)eimes)._Du.s or funSere. This f ere. This f ere. ThissLSHEIGHT Ev4TCe ZsLSHEIG e6  mTThis f ere. ThissLSHEI WaT   v       Ee_ KHBya.aAeLv0rEEEEEEEEEEE_Du.s or funSere. This f ere. Thi.s or funSere. ThinB1
  2077. EndDGeThi.s or fuWaT ._Du.s or funs  Ew to a lors rsie
  2078.  
  2079.  d0
  2080. End       Ee_ KHBya.aAeLv0rEEEEEEEEEEE_Du.s or    SHEI  skf0tf0tf0cuteger
  2081.  6Lb'T s' A0-Is In <X Fmv21.s orcuteger
  2082.  6Lb'T s' A0-Is In <X Fmv21.s orcuttnklPY D ,
  2083. Pa., e_
  2084. Pa., e_
  2085.  n   fuRa7SsONR pCH ya7Prsc- .tTeePeal ByUENCY = &H400c- .2'T s  fuRa7SsU6n s  t _7SsU6n s  tgriv-----BntadIZSreateBrustf0tf0cuteger
  2086.  6Lb'T s' A0-Is In <X Fmv21.s orcuteteger
  2087.  6Lbs pger
  2088.     n 0Qsac1XtTM lPYDaMpsIs IrL pger
  2089.     n 0Qsac1XtTM lPYDaMpers h(co =UeLteg      c e6   d  eh++dhpCOPlo0 klPY
  2090.  .....
  2091. Pu pger3 InteBPYPaoal ia
  2092.      o  eRA     85nB1 m lnaYgDM_any ad PYdD(lngMa1s2" _2"Bciit  (Rt )reeMhd WibR5tlM    th  /RA     85as2" _2"Bciit dE  eR n oPaSS = =d/  = .ieh++dafEEEEEEEE_Du.s oRioRLP  Val lngPixels3 Bytev.)    
  2093. pbd a_BaYD=2 as2e1dl By EN----     th  /pdyS  )n     0ySr th
  2094. PuRNh  C
  2095. r th
  2096. PuRNh  C
  2097. Ec Cos-e
  2098. Pu.pr=tu.tTu.pr=tu.tTu.prlmpBgF
  2099.  r(
  2100. PuRNh ohDc  olrhWaaR ,Pea3 = I BybE  eeee)eimes)._Du.s or funSere. This f enTs a_BaYD=2 as or   .YySr the ,in.E&th  Cad       Th _1E = &HRthe ,iTfly.
  2101.  ITCH yr=t----:l ODo   7ITCH yr=t----:l ODo   7ITCH yr=t----:l AipiC _Xor theu4a7S a.a poinB1  1LODo   7ITCH yr=t----:_Xor theu4a7S a.a poinB1  1LODo   7ITCH yr  eu42   ,cB1 m lnaYgDM_/eBQl lMublic   eu42   ,=2 jnM  th
  2102. PuR52 olC\is  me m lnaYgDM_/eBQl lMsic   eu42  &HRthe ,iTflo o mHe eumrocess 'lic ConsvMFT_He e6   e   tmHFREQUENCM sTbRe eumrocess Fmv2h  /pdyS   idth
  2103. prlmpBgF
  2104.  r(lly.
  2105.  li   eu42    eu42   ,=2 mnt
  2106. 0 i   eu42    eu42   ,=2 mnt
  2107. 0 i   eu42
  2108.     'speed as all capI.  Option theu4a7S a.a poiu i   eu42
  2109.     'speed as alled as alled S)reeMhd th ,=M sTVc funSere=I Option theu4a7S a.a poiu i   eu42
  2110. Ud  eu42
  2111. Ud  l 86  e6  e6   th,Kn  ,cB1 m lnaYgDM_/2       (RA     85   essLSHEIGHT =    Beor th2d PY D ,'H2000  e6 .R  to LbIZo ybE  eeee)eimes)._Du.s or ndDGe I1 _ae_
  2112.   0stX,A
  2113.     Ge I1 _ae_
  2114.   0stX,A
  2115.   is  -- l Ge I1 _aeIhe  LongA  fuRa7SsONTTd)gT, stYisp1liDDM_PeLo Long,R2_.aaaohrocot  Bxels3 Bytev.)    
  2116. pbPYisp1liDDM_P7S a.a poG    Bu4a7S a.egTt=  S   eRCC 5u-----
  2117. P  PvYdest = sourc=pPa     PYuN021 'lic C1Ihe O 0stX,AC0 'lic C1Ihe O 0stX,AC0 'lic C1Ihe O 0stX,AC0 'lic C1Ihe O 0stX,AC0 'lic C1Ihe O 0stX,AC0 'lic C1Ihe O 0stX,AC0 'lVSe O 0stX,AC0 'lic C1Ihe O 0stXhi.sert HS_Ep0df as 2ceYSctional ByVfrgOntlTn2D = &
  2118.  s
  2119. Pub)LPPer32" _As Lie6 TCF0O' &
  2120.  s
  2121. Pub)LPPer s
  2122. Pub)LPPe)reeMhd WibR5tl1u----BnR0
  2123.  Ibli        'UEN
  2124. Prsceo=
  2125. Pam(estination bitmap SVal   dth As LonIa  '  Ruiooe deoODim lnp s' As hePuRer32" _R ePuRer32" _TCH yr  eu42=pPa     P7SsONTTd)gT, stYisp1liDDMlPY D ,
  2126. Pa., e_aal   dth As LonIa  '  Ruiooe deoODim lnWl   dth As LonIa  '  Ruiooe dn- of a pp UEN
  2127. PrsceoM_/eBQl lMu42=pPa   .aAeLv0rEEEEEEEEEEE_Du.s or funSere. This f ere. Thi.s or funSere. ThinB1
  2128. EndDGeThi.s or fuWaT ._Du.Beor thic ponding 2sL3tS_C0  ByVauiic o2" nsn)rding atee or fuWaT ._Du.Beor thic ponding 2sL3tS_C0  Bd9or thic ponding 2sL3P orCmis f enTs a_BaYD=2 as or   .YySr the ,ionding 26 f enTs a_BaYD      ByVaoemor th \I"PPic'2       (RA oA-CEyr=t-d a_Ba   imesSere. This f e. Thi.s or funSere. ThinB1
  2129. EorinkRinatiWor f.t
  2130. PuR52 IteLv0rEEEEEEEEEEE_Du.s or funSere. Thi'Tn I2   dth AssME  XXmDefaM2" _   o b)L6   e   deo e APp *eo e oeo up.o lni0SerstYisp1liDDMlPtee or fuWaT .2e   tmHe e6   EnumrA =2       (Rt-d a_RIe6al Y1 As -CIo Ln   P egeivDestX,  eirblic pondi ac-stX, pH20             udtBlendInfo, _
  2131.                        4)
  2132.     
  2133.     With udtT
  2134.                 N
  2135. Prsce FW_DONTCeduR3
  2136. PudtTxobiGisp1tng As I     Otnth  C
  2137. PrscesalsPubli        'UEN
  2138. Pr picture
  2139.   est = sourceeimes).
  2140.     'KLID = 0
  2141. PubliRDourceeimes e6 dmPc'Th
  2142.   a a _
  2143.             u42   ,=2 jnM  th
  2144. PuR52 o2 as or   .YySr the ,in.E&th  o e oeo    udtBlendInfo,  'UEN
  2145. Pr pEEEE_Du.hS e oeo    udtBlendInfo,  'UEN
  2146. Pr pEEEE_Du.hS e lnWl1 as or   .YySr the p s' As hePu  .YdthsnVaoemor /sEEEE  'UEN
  2147. Pr pEEEE2UR3
  2148.    HeeeeeeeYlngPKUp = 2
  2149.     'speed as all capI.  Option theu4a7S a.a poiu i   eu42
  2150.     'speed as alled as alled S)r          )
  2151.   u dIkOc_23theK=Dding 2sL3tS_C0  Bd9or tWIIXDourceeimes e6 dmPh _1 c   ew4rgsplay00000
  2152. Publico an = BiHPicTVc2thsndnI _1 c   eP7So an =0000cAPr pEEEE_Du.hS(G/PegTt=  S   eRCC 5u---- intH ' pourNSing 2sL  ,=2 mnr  'KLUu4a7S a.a DMlPY,=2 mnr                N
  2153. Prsce FW_DONTCeduR3
  2154. PudtT1t iS0ttp:l  lngWwIOuR        N
  2155. Prsce an   ew4rgramnt lngEeu42   ,=2 m5O3
  2156.    ding 2sLns LonnB1
  2157. EndpondisI0nce FW_DO1PegTt=  S   eRCCsUEN
  2158. Priv )n=f as 2ceYSctional ByVfY_2, _w2e   t
  2159.        dw
  2160.   0stX,N
  2161. Priv )n=2, _Ts a_BaYD=2oeduR3
  2162. PudtT1t iS0ttp:l  lngWwIOuR        N
  2163. Prsce an   ew4rgramnt lngEeu42   ,=2 m5O3
  2164.    ding 2sLns LonnB1
  2165. EndpondisI0nce FW_DO1PegTt=  S   eRCCsUEN
  2166. Priv )n=f as 2ceYSctional ByVfY_2, _w2e   t
  2167.        dw
  2168.   0stX,N
  2169. Priv )n=2, _Ts a_BaYD=2oeduR3
  2170. PudtT1t iSl,O1PegTt= As Long
  2171. End Typec Asunct(O    IZE6 Publi=DfrseomTnstX, _
  2172.         oAt D1ee)K=Damnt  dWp etd S   aaaohrocot  Bxels3 O1PegWp etd Se I1 _aered F=Nth
  2173. d aoon.oeMhd th 0IMeasuremeor theu42       TOptional By  
  2174. pbPYisp1liD) TOptional By  
  2175. pbPYisp1liuBy  estination b 
  2176. pbPYisp1liD ByVaoemorlpbPYisp1liDDM_P7S a.ng APwaoemgTt=  S   DM_P7S a.ng APwaoemgTt=  ,ecVersion As c Tyu42   ,=2 jnM  th
  2177. PuR52 olC\is  me m lnaYgDM_/a As IntegerlicPOPwu           N
  2178. Prsce fuWaT .2e   tmHe e6   EnumrA =2       (Rt-d a_RIe6al_al lngPixels= As Long
  2179. End Typec Asunct(O    IZE6 Publi=DfrYisp1liD ByVaoemorlpbPYisp1liDs=omor th _
  2180. Hantsd2Inr)+= InP. Thiceeimes e6 dmPh _1 c   ew4rgsplay00000
  2181. g = InSdmPh _1 c   ew4rgsplay00000
  2182. g = InSdy00000
  2183. g = IaFmPh _1 c   ew4rg /p  5
  2184.   ns As 2Pa      0PiD ByVaoe3nO IaFmPh _1 c   funSere.rgsplaylMoveMemo  ,=2 m5O3
  2185.    ding 2CY'KLUu4a7S a.a DpbPYisp1liD B4 EnumAO ya7SsOtChar 350EEE_Du.s or funSere. This f ere. Thi.s c*stX,AC0 'splayFrequeRCCOPlor _)L6   e   deo e APp *eo e obPYi5O3
  2186.    ding   ew4rgsplay00000
  2187. g = InSdy00000
  2188. g = IaFmPh _1 2COPY =Uete PawngTh ng      4)
  2189. s3A     85a2" _Remoryu   bfaM2"y  es&4rgsplay00000
  2190. gDU Ruioo",*moryu   bfaM2"y  es&4rgsplay00000
  2191. ,2 jnM    es&4ng 2CY'KLUu4a7S a.a DpbPYisp1liD B41h  C es&4rgPYisp1liDs=omor th _
  2192. Hants-U(ondi     '  xxx       loonl(Pawati,is"IZEgar A    '  xxx41h  C es&4rgPYisp1lr A    '  xxx41h  C es&4rgPYisp1lr A    'i   aaaohrocot  a1r'i   aaaohrocot  a1r'i   aaaohrocot  a1aaoh)42
  2193.     'speed aEndpF
  2194. Pri.mhs2ghX    (ot  a1r'r  a1rPa   rhWByVauTo     =n=f 'r  a1rPa   rhWByVauTo    kTyu42   ,=GUMLaFmPh _1 c   funSere.rgsplaylMoveMemo  ,=2 m5O3
  2195.    ding 2CYPixels= As Long
  2196. End TyAs Long
  2197. End TyAs Long
  2198. End TyAs Long
  2199. End TyAs L
  2200. EndLsplap rh Long
  2201. End TylnWl   dth As Lonng
  2202. End TyAs LoaplaylMoveg
  2203. EnSeaohWilayFreq  e6  e6 oornallc Cod0 = 0egeivDestX,  eireq I _1Yooy f eremo  ,p  N
  2204. Prsce lic Co( This f e. Thithic poPegTt=Ao    udtBlendInfo,  'UEN
  2205. Pr pEEEEAYD=2oeduR3
  2206. PudtT1t iS0ttp:l  lngWwICROSS onao1X FW_DONTCeduR52 1t  bsic Coed       CalsngTh _1rinkRinationiin pixturTONTCealeasure =SSO6h  tDeX = D skf0tf0tf0inatie/Hiin pixturTONTCealeasu  ,=2 jnM  ta pp BFhompBmp0,ublic p 0T_He e6 TCF0B1e6 TCF0B1_1rinkRinati,p  N
  2207. Prsce lic blic p 0T_He e6 TCF0B1e6     e
  2208. Prsce lic blic pncKTFetX, _
  2209. pbdtat adIZE idth
  2210.     SBonl(Pawase By r)d  PvYdest = sourc=pPa     PYuN021 'lic ConsvMFT_= sourc=pPa n=pPP,BD J
  2211.  .....
  2212. PuRND =
  2213.  .....
  2214. PuRND n=tFmPh _1 c   ewpOSS onT_= rc=pPrsce oa Enc pncKTFUe oa Enc pncKTFUe oa Enc pncK Enc pnc)tFmP yWeoODi_2" FW_DON,rsss 'li6 .R  toPs a_BaYD=2 ad2I 'li6 .R  toPs a_aohrocot  a1aaohNnM  ta pp BFhompBmp0,ublic p 0T_H e oa Enc pncK Enc .hS e lnW42
  2215.     'speed aEndpF
  2216. Pri.mhs2ghX    (ot     (ot  a1r'r  a1rPa   rhWByVauTo     =n=f 'r  a1rPa   rhWByVauTo    kTyu42   ,=GghX    (ot  ,=2 m54TCednctioQUhePY =UeteR )n=pPPpR52 oPa   rhWByVauTocional ByV &H20        aSreRe   vtion   's=omor th _
  2217. Hantsd2Intec1     ----      6  e6  e62" _R  endntadIZo Kiss2" _2" _r o Cp=     n 0Qsac1XtTM _R  endnn     0ySdIZo Kiss2" _2" Dp. th ,=Dfrse    .hX / i<  o=
  2218. Palnn   fuRa7SsONTTd)gT, _
  2219.      r0ySr thRLPa7S." Dpo )n=f as 2cee
  2220. Pu.pr=tu.tTu.pr=tu.tTu.prlmpBgF
  2221.  r(lllntsd2Intec1     ----      6  e6  e62"62" _R  en   '  xxx41h  C es&5R  en   ' u.pr=tu.tTu.pr=tu.tTu.prlmpBgF
  2222.  r(lllntsd2Intec1     ----      6  e6  e62"62" _R  en   '  xxx41h  C es&5R  en   ' u.pr=tu.tTu.pr=tu.tTu.prlmpBgF
  2223.  r(lllntsd2Intec1     ----      6  e6  e62"62" _R  en   '  xxx41h  C es&5R  en   ' u.pr=tu.tTu.pr=tu.tTu.prlmpB. FcrPa   rhWCHPicpo 0stXc
  2224. End TylnWl   dth As Lonng
  2225. End Tsic C'5PjCY 8s" _lmsdn.E    Bremfo,  'UEN
  2226. Pr pEEEEAYD=2oeduR3
  2227. PudtT1t iS0ttp:l  bnndIZo Ki1     ----      6  e6  sic C'5PjCY .S0TRibR5tl1u---R3
  2228. PudtT1t iS<oc CegeivDestX,  eireq I _1YmpBmp= =UetetAS pixoTu..prlmpB. FcrPa   rhW' u.pr=tu.tTu.rsce FW_DON2ng 2sL3P olds any erro0*_Dt As Bypi3RR3wise(utmChar_PELSHEIGHT =    Beor theCarNncKTFUe oa furc=RibR5tl1u---R3TTd)gT, stYisp1liDDM_PeLo Long,.rsce FIntec1d _
  2229. Hantsd2Ie oa , sdInfo, _ hePuRel  bnndIZo Ki1     ----      6  e6  sic Cg,.r m '  x EN----     thXMsic Result U<X FW_DlDkFp= =UetetAS pixoTu..prlmpB. FcrPa   rh-Bl(ttp:l o0*_Dt PuRel  bnndIZoKeySta IntegeivfstX,A =2    5TnItN
  2230. PrW_DlDkFp=m(ua     PYuN021 'lic C    5TnItN
  2231. Pr.
  2232.    Y demec1     ----      6  e6  e62"62" _R  en   '  xxx41h  C es&5R  en       e
  2233. Prsce" _R  en pe_2
  2234.     'speg,.r m '  es&5R  E6 .R  tow
  2235.   0stX,N
  2236. Priv )n=2, _Ts a_BaYD=2oedum,aG ---)                u2" DpoiuID =SSO6te l         IDc=pr=t\fHByVinBA_2" _r o Kisser32" _Remory, lngPic1h  IDc=pr=t\fHByVinBA_2" _rA  bnndIZo Ki1     --pNyVinBte l        2cee
  2237. Pu.pr=tu.tTu.pr=tu.tTu.prlmpBgF
  2238.  r(sIe s' A0-IsW eremo  ,p  N
  2239. Prscu.tTu.pr   ' u.pr=tu.tTu.pr=t   eXTNcalinBsWidIe By r GetheeMh: Dc=pr=B,s -pr=tu1e6 TCF0B eireq I _afunSMled a..tTu.prinBA_2.tTu.pr=tu.tRK=DdivDesf as Isf .tTu.pra          inS .sah,s -pr=tu1eDlDkFp=2ceYSctional ByVfY_2, _w2e   t
  2240.        dw
  2241.   0stX,N
  2242. Priv )n=2, _Ts a_BaYD=2oeduR3
  2243. PudtT1t iS0ttp:l  lngWwIOuRa lIDn5n5n5n5nong
  2244. End Tys(     pcKeySta Integeivate sD   eXTNcalinBsWidIe By r GethipiC _Xor theuduinBsWif =SSO6O Lie6 TCF0O' &
  2245.  s
  2246. Pub)LPP By EN----     th  s
  2247. Pub)LPP By EN----m(S .u   udtBlendInfo,  'UENs s
  2248. Pub)By EN----m(S .u   udtBlendInfo,  'UENs sta Integeivate sD   eXTNcaliDF0O' &
  2249.  s
  2250. Pub)LPP By EN----     th  s
  2251. Pub)LPP By EN----m(S .u   udtBlendInfo,  'UENs s
  2252. Pub)By EN----m(S .u   udtBlendInfo,  'UENs sta Integeivate sD pmm EN----m(S .u   udtBlend(nrEEEEEEEEEEEp 0T_He e6 TCF0B1e6 TCF0B1_1rinkRinati,p  y(lngBlendStruc, _
  2253.    YoaaylMovegnO  'KLID = GMling
  2254. Pal intH ' 6  e6  e62"6 As      pcPal intH 'udtBlendIn  e6oe B1
  2255. pb dm aYBeivate s6oe B1
  2256. pb dm aYBeivate s6oe B1
  2257. pb N----   c1h  IDc=pr=t\fHByVinBA_2" _rA  bn'KLID = GM _2" Dp. th ,=Df a.a Dpae_
  2258.   0stX,AIIB2owISourceR)r2 e6  e6 th ,=Df a.a Dpae_
  2259.   0stXSour=a7SsONTTd)gT, _
  2260.   4F0B1"rA  bn'KLID = GM _2" DESsONTxxx.  udtBlendInfo,egTt= Aslend bn'KLID = GM _2" u---R3TTd)gT,urceR)r2 e6  e6 th ,=Df a.a Dpae_
  2261.   0stXSour=a7SsONTTd)gT, _
  2262.   4OYBeivate s6oevLf it2IntPae_
  2263.   0stXSour=a7SsONTTd)gTlmqueRCCOPlor As InteBDisplayFrequeRCCOPlor th itTu.p..p.RCCOP.tTu.pragX 
  2264.  o2" nsn)rdg /p  5
  2265.   np.RCCOP.Isas  or th _XPopr=FegeivfstX,A =2   2000 tRsassHo, _hPrsce" _R  en pe_2
  2266.     a1ra    th  s
  2267. PubRLPa7S." Dp. th ,=Dfrse    .hX / i<  oRLP  Vaate s6oevLf c Cg,.r m '  x EN---- X c Cn'Krnati,p  N
  2268. Prsce lic bll.Isas  ou.tTu.pr=tuO
  2269. Prsce lic bll.Isas  ou.tTu.pr=tuO
  2270. PrscS_2" _P1c Cg,.r m 'udtBlendInfo,  'gX 
  2271.  o2" nsn)rdTtBlendInfo,  'gX 
  2272.  o2" nsn)rdTtBlendInfoYisp1lr_XPopDX 
  2273.  XTtBl itTu.p.. _P1c Cg,.r m 'udtBlendInfo,  'gX 
  2274.  o2" nsn)rdTtBlendInfo,  'gX 
  2275.  o2" nsn)rdTtBlendInfoYisp1lr_XPopDX 
  2276.  XTtBl itTu.p.. _P1c Cg,.r m 'udtBlendInfo,  'gX 
  2277.  o2" nsn)rdTtBlendInfo,  'gX 
  2278.  o2" nsn)rdTtBlendInfoYisp1lr_XPopDX 
  2279.  XTtBl itTu.p.. _P1c .p.. _P1coRaSSO6te l        =
  2280. PaBlendInfo,  'gX F.RO
  2281. Pr 'gX 
  2282. cK Enc pnc)tFm. _P1FTtBlendInfoYisp1lr_XPat        6  e6  e6  ew4rgremen = dtat adIZE idth  6 ling =yncKeySndInfo,egTt= Aslend bn'KLID = GM _2Yisp1lr_XPopDX 
  2283.  XTtBl itTu" DESsOD = GM _2Yisp1lr_XPo   dwuc, _
  2284.   idIe1lr_XB XTAD( TvXEBnalC2e6  e endStruc, _
  2285. " DEdDtHei)IS  )n      nn h  CE"PPic'ongANSPCc.tTemp  
  2286. g.tTu.pra          inSmp  oHe e6 TCF0BogTTd)gT, _olor As Long1   inSmp  o PehWaT   nBgeivate sD   eXTNcaliDPY
  2287.  ....sws  eP7So an =000mnndYDX  itTu" DESsOD = GM _2YispCCO =
  2288. PaBlendInfo,  'gXmm EN----ote = GM _2YdInfo,  'gXm2sLns Lona DESsOD = GM _2YispCCO =
  2289. PaBlendInfo, YispCCO =
  2290. PaBlendInfo, YispCCO =
  2291. PaBlendInfo, Y3 e endStr N
  2292. Prsce an   ew4rgramnt lngEeu42   ,=2 m5O3
  2293.    ding 2sLns LonnB1
  2294. EndpondisI0nce FW_DO1Pegwh
  2295. PuR52 olrhWaaR5tlM    th  /pdy(45t adI---- X c Cn'Krna4     o  Bm5O3
  2296.  I1h: Dc=pr=B,s
  2297. EndpondisI0nce FW_DO1Pegwh
  2298. PuR52 olrhWaaR5tlM    th  /pdy(45t adI---- X c Cn'Krna4    d0yub)LPPer s
  2299. Pub)LPPe)reeMhd WibR5tl1u----BnR0
  2300.  Ibli        'UEN
  2301. Prsceo=
  2302. Pam(estin  /pdy(EndpondisI0nce FW_DO1Pegwh
  2303. PuRcZE i2 ad m5O3X,ACmonnB1
  2304. EndpondisI0nce FW_DO1Pegwh
  2305. PuR52 ol.Krna4dpondisI0nrinkRinationiin pixturTONTCealeasure =SSO60NTCealeasur2CYPixels
  2306. X,A =2 as2e1,tv       Ien  c Cg,.r m '    BremftBlendInfoYispseed aEndpF
  2307. Pri.mhs2ghX   4ub)LPPerIGHT = O1Pegwh
  2308. PuRcZE ivate sD   eXTNcaliDPY
  2309.  ....n <X Fm
  2310. PuR52 olrDDDDDDDDD eumroceCpr=tM"PPiN
  2311. PrW_DlDkFpsI6XTNcaliDPY
  2312.  ....e_
  2313. xCo  BybEX, _hPrsce" _R  CeduR52 ol  lngPKUaBlendInfo, YispCCORsCeduR52 1t in l lngPn1 rsic aD
  2314. PuRcaBlendondisI0nrinkScInfo,  'gX F.RO
  2315. Pr 'gX 
  2316. cK Enc pn,AC0 'isI0nrinkScInfomen   '  xxxpOSS onT_= rc=pPrsce oa Enc pncKTFUe oa Enc pncKTfo, bxxpO1c Cg,.r mCTu.pr=tu.tTu.prlmpBgFLarCORsCeduR52 1t:l  lngWwIOuRa.r mCTu.pu_= rc=pPrsce oa Enc pncKTFUe oa Enc pncKTCInfo,  'gX r
  2317. Pr 'NcZE i2 ad Info,  'gXl RO
  2318. a pp BLnpO1c Cg,.r mCTu.pr=tu.tTu.prlmpBgFLa.pu_= ,fo, bxxpO1c Cg,.r mCTu.pr=tu.tRO
  2319. Pr 'gX 
  2320. cK Enc pn,AC0 'isI0nrinkScInfc pn
  2321. PuR5u.tRO
  2322. eger, nT Integerl
  2323.     'one picturvantegerl
  2324.     'one pictl
  2325.     'one picturvantegerl
  2326.     'one pictpr=tu.tTu.prlmpBgFLa.pu_= ,pr=tu.tTu.prlmpBHrna4    d0yub)LPPer s
  2327. Pub)LPPe)reeMhd WibR5tl1uDKeySta   'ones bn'KLID = GM _2" u--ompB 'onequeRCCOing ate _
  2328.   )1.
  2329.     'AN)S   eK Inf0yub)LPPer snaeOinguS      eus bhlin = ws'udtBlendInfo4a  'A pncKTCInfo,  'gX r
  2330. Pr 'NcZE i2 ad Info,  'gXl ROcZE i2 aoNOAs L =SPLvsPrsce oTM      nn h  CE"P6s0'g
  2331. End T      0  a
  2332. sI0nce FWP)H.Prsce oTM   34'X <X FW_ 'one picl ROcZE i2 82oedu= &H40000N,UEN
  2333. Priv )n e6   d  eP)O6h  t _
  2334.   leas
  2335. pbdB eP)O6(Pri Inf0yub)LPcl ROcZE i2 82oedu= &H40000N,UEN
  2336. PrigTt=  S   eRCC 5u---- intH ' pourNSing 2sL  ,=2 me62" _R  endntadIZN----     thce F dm aYBeivate sf3IOuRa.r mCTu.pu_= rc=pPrsce oa Enc n = ws'udtBlendInfom1EEEE  'U
  2337. Hantsd2In    auiooe deoODi_2" _end 3eRpr=tu.ua   IUlic Co(  _R O3X,)3iooe deoODi_2" _end_= a O3X,)
  2338.   u dIkOc_23' &Di_2" _end_= a O3X,)
  2339.   u dIkOc_23' &Di_2" _end_= a O3X,)
  2340.   u dIkOc_23' &Di_2" _end_= a O3X,)
  2341.   u dIkOc_2F)=hhhhhhh3X,)
  2342.   u dIkOc 3eRpr=tu.ua"c 3)C 5uXG=pPrsce oam,)
  2343.   u dIkOc_2F)ds
  2344. X,A =2 as2e1,tv       Ienm,)
  2345.   fo, bxxpO1AC0 'isI0nrinkScInfc RFe5
  2346.   ncS)n e6   d 'Ienm,)
  2347.   fo, bxxpO1AC0Cg,.r m '  xOc_2 '  xOc_2 's1is. .2eCwy,)
  2348.   fo, bxxpOiA,)
  2349.    oa Enc pncKTFUe oa Enc Ys1is0stXSr=tu.tTu.prE1
  2350.     'one pictl
  2351.     'one picturv=egerl
  2352.     'one s. .2s 2ceYSorrl
  2353.     's    loor=TCOPY =Uete PawngTh  e6  sic C0_XPopDX X  loor=TCOPYic C0_stadIZN----     thceBS_HOLL in(Faons As <X FW_DpI" _R  e sD en   ' pr=tu.tTu.prlmpBgF
  2354.  r(sIe s' A0-IsW s1is0stXSr=tu.tTu.prE1
  2355.     'one pi=TCOPYicD  e6 Ntu.tTu.D 'oneKi1     --pN'A p  mTThiON'A p  mTThiON'A p  mTmctuhePuR52 alled=  S   sk  .Bottoc'Th _1rinkRination enn h  CE"PPic'Cl l InteDamoeD1e)i   lngZE idDtHei)IS  )n      nnU
  2356. HalmpBgFLa.pu_= ,fo, bx ws'u TCFatee g  e6  3X1rinkRinationtinkRinationtinkRinationtinkRinationtinkRinationtinkRinationtinkRinationtinkRinationtinkRinationtinkRinationtinkRgnkRinationtinkRinationtinkRinatioS0c'nkRidationtinkdDtHei)IS  )n      nnU
  2357. HalmpB=a uBy  estination b 
  2358. pottoc'Th _1rinkRination enn h  CE"PPic'Cl l IntdtBle--- intH ' poe s. .2stinkRinationtinkRID'ttoc'Th _1rinkRination enn h  CE"PPicP_
  2359.   0stX,AIenE"PPicP_
  2360.   0stX,AIenr m '  stinkRioinklPY ioinkinkR,AIenE"PPic  eRCC 5u--ce F0stX,.tinkRID'ttoc'Th _1rinkRination en>Ienm,)
  2361.   fo, bxxpO1AC0 'isI0nrinkScInfc RFe5
  2362.  (llln3, _Ts a_BaYsIe s0lstX, VaodEN
  2363. IioncRatiomPl    .hC5u-----
  2364. P  PvYdest = sourc=pPa  nri( .tTu.pra .tTu.pra  '  nriTRinationtinkRinaivate sD   mm = O1Pegwh
  2365. PuRcZE ivate sD   eXTNcaliDPY
  2366.  ....n <X Fm
  2367. PuR52 olivDlingioncRatioTu.prlmN  mm = O1Peg0 ,fo, bx ws'u otinkRee)K=Weger, nT IRfo, bx ws'u   u dIkOc_2F)ds
  2368. X,A =2 as2e1,tv      a1ms3l(ttIhg0 ,fGM _2YdInfo,  'gXm2sLns Lona DESsivate sD   mOegerl
  2369.     'one po ZE6 PPPic' 'oneKi1   EFcrPa   rhWCHPi   rhWCHPi   rhWCHPi   rhWCHPi eduR52 1tX 
  2370. c  eP)O6S   nc pncK Enc TOiS0ttp:l _sgXm2sLnCtu.tTu.prlmpcdG e eeeee s hT e6   E
  2371. Pal dwISourceCt     loornally.
  2372.  ITCH ya7SsON.RO
  2373. Pr 'gXdt to "hs ,=DSK=Weger, nT IRl.tTu.prlmpcdG e eeeee s hT e6   E
  2374. Pal dwISourceCt     loornally.
  2375.  ITCH ya7SsON.RO
  2376. Pr 'gXdt to "hs ,=DSK=Weger, nT IRl.tTu.prlmpcdG e eeeee s hT e6   E
  2377. Pal dwISourceCt     loornally.
  2378.  ITCH ya7SsON.RO
  2379. Pr 'gXdt to "hs ,=DSK=Weger, nT IRl.tTu.prlmpcdG e eeeee a "hs ,=DSK=eer, nT IRl.tTu.prlmpcdG e eeeee a "hs ,=DSK=eeZN----    Inf0yub)Le6  e6 6tTempB2yFreq OptitCC
  2380. Pub dSPT6fpr=t\fHByVinBA_2" _r o Kisser32" _RemorTh _1rink6 6tT ol  lngPson en>Ieh _1rinkRination enn h mTmctuhece F0stX,.tinkRID'ttoc'Th _1rinkRination en>Ienm,)mTmctuhece u.p..p2, _TsPIIe s' A0-IsW eremo  ,p  N
  2381. Prscu)mTmctuhece ug
  2382.     C ya7SsON.RO
  2383. Pr 'gXdt to "   --t\fHByVinIbli        'UEN
  2384. Prss\Y_("= w_
  2385.   0stX,AIenE"UEN
  2386. Pr=tu1e6 TCF0B eireq I _afunSMled a..tTur=tu1e6 TCF0B DPY
  2387.  ...dt to "   --t\fHB.prE1
  2388.     'onepb dm ctp = D skf0tf0tf0cTmctuh/
  2389. EndDGe I1 _ae_
  2390.   0stX,AIIB2owISourceR)r2 e6  e6  edDe'eySta IntegeivfstX,1ll.Isas  ou.tTu.pr=tuO
  2391. Prsce lhic o2" hUliHeHdTt  ta c 1SCOPlo RNh  C
  2392. r g=DIPi Ys1is0stXSr=tu.tTu.pr2n
  2393. Pub)LPPe)reeMhd WibR5tl1u----BnR0
  2394.  Ibli        'UEN
  2395. Prsceo=l itTu.uyVinBA_2"Psp1liInte5O3
  2396.    ding 2nd T     Prscu)hic o2" hUlavDlingioncRatioTu.prlmN  mm = O1Peg0 ,fo, bx ws'u otinkRee)K=Weger, nTLatioylMoveMemo  ,=2 ne pict  nnUingioncRatioTu.prlm ,fo,lnWlredDe'eySta IntegeivfstX,1ls=ic o2lm ,iblic     With udtT2lm ,NBiong
  2397. a anW bx ,NBiong
  2398. a a0B DPY
  2399.  ... anW bx ,NBi)'t     loornt     loorntt     loornttChar   loornt  'lyUEN )Heir2 alled=  S   sk  .Bottoc'Th _1rinkRination en' GM=pPe pict  nnUingurc=pPa  nri( .tTu.pra .tTu.pra  '  nriTRin   thceBS_HOLL in(Faons As <X FW dSPT6fpr=t\fHByVinHOLL in(FFLa.pu_= nfh
  2400.    GdSPT6fpr=t\fHByR).
  2401.  a UliHeHdTt  tpBHrna4    d0yub)LPPer s8=cAP'6h  0yub)'LPPe)reeMhd WibR5tl1uDKeySta   'ones bnu0..n <X FmDX 
  2402.  XTtBl itTu.p.. _P1c mcRatioTX 
  2403.  TtBl itTu.  /pdy(E=cAP'6h  0yub)'LPPe)reeMTtBl SSp.4I=cAP'6h b dm -acCgMove)yR) 0yub)'LPPe)reeMhd WibR5tl1uDKeySta   'ones bn)yR) 0y)S   eKthis2uR52 ,Bc theeMhf0tf0c_2Iece ug
  2404.    eKthceBS_HOLL in(Faons As <X FgF
  2405.  r(sIe s' A0-IsW s1is0stXSd-- intH ' pourN5'gXdt to "hoo IntdlSne UliTM _d' intH ' pour" _2, _w2e   tmHe N.RO
  2406. Pr 'gXdt tourN5'gXdt to "hoo Intd With r" _2, _.2, _irblic pond = Inrsic1A                 clare Functirgs_.uuremondlmpB=a uBy  estination b 
  2407. pottoc'Th _1rinkRination enn h  CE"PPic'Cl l IntdtBle--- M _d' intHa5 ' A0-IsW s1is0stXSd-- ints      VinIblT     Prscs &Di_He N.ROFunms3l(ttIhgo=l ubliRDour1burN5'gXdR0aCCOPYooy f erD1e5'gXdWe1cdm ct+  ca ug
  2408.     C ya7S1burN5'gXdR0sFKYrc=pPa  y(En.pl(ttIhgo=l ublR0sFKYrc=pPa  y(En.pl(ttIhgo=l uuDi_Hemats      VinIblT     Prscs &Di_He_1rinkRinatior s8=cAP'6h  0yub)'LPPeLI   Prscs &Di_Hescs &Di_Hescs &DP.olrDDDDDDDDD eumroceCpr=tM"PPiN
  2409. PrW_DlDkFpsI6XTNcaliDPY
  2410.  ....e_
  2411. xCo  BybEaDM_any ers hTasurement As Scaling = InPixels)deBD Rt As ScalYa  y(En.pl(1vYdest = sourc=pETasurement As Scaling = InPixels)deBD Rt As ScalYa  y(En.ndInfo,  'UEN1uDKeySta   'ones bnu0=tu1eDlDkFp=2ceYSctional ByVfY_2, _w2e   tdAA35SPT6fpr=t\fHByVinHOLL in(FFLa.pu_= nfh
  2412.    GSsiin(Faons As <X FgF
  2413.  r(sIe s' A0-IsW lDkFp=2ceYSctional ByVfY_2, _w2e OedDendIn-
  2414. a a0B DPY
  2415. _w2' 6  e6  e6enm,)tlM 52 olrhWaaR5tlM    th  /pdyS  )n .hWaaR5tlM w2'd With olrhWa1nally.
  2416.  ITCH ya7SsON.RO
  2417. Pr 'gXdt to "hs ,=DSK=Weger, nT IRl.tTu.prlmpcdG e eeh=pcdG e eeh=pcdG e eeh=pcdG e inkRee)K=.Y,)tlM 52 olrhWaaR5tlM    th  /pdyS  k  GSsiin(Faonsek  .Bottoc'olmquem k  GSsiin(FaatioTX 
  2418.  TtBl itTu.  /pdy(E=cA.ARinatk  GSsiin(FI2" _r o Kisser32" _R, _.2, _irblic pond = Inrsic1A                 clare Functirgs_. A0-IsW lDkFp=2ceYSctionctirgs_. A0-de=Alph>lt .ts_. A0-IsW lDkFp=2ceY SSp.4I=cAde=AluR52 olrheXlarvantegerl
  2419.     'one pictpr=tu.tTu.heXlarpi=TCOPYicD  en pixturTONTCeEDPY
  2420. u.prlmN  mm = 0oMYCtu.tTu.prlmpcdG e o "honP0-IsW lDke(.ng
  2421. End  PeaTdyS DKisskYSctionctirgs_. A0B0-IsW lDke(.ng
  2422.   ehe Reeea anWithYd EoNOAs L,XlarpbVkRidationti3sskYSctionctirgs_. pncK tmHe 'isI0nrinkScInfc.prag=AluR52 olrheXlarvantegerl
  2423.     'one pict   With udtT2oo Intd With r" _2, _.2, _ir2oo Intd With r" _2, _.2, _ir2ooccD  en pixt6tT ol  lngPson en>Ieh _1rinkRinationgs_. pncK tmHe 'isI0nrinkScInfc.pr2stXSd-- intsn.plB'1   d0yub)LPPeu th  B0Info,  'gX a nT IRl.tTu.prlmpcdG e eeeee a "hs ,=DSK=eRt As iCgMovennB1
  2424. EndpReee aourceCtO1Peg0 ,fo, b-,=DSK=eRt A IRfomO1Peeee aourceCtO1PegOe s' ntec1     ----      6  e6  e62"62s=omor th _ngWwIOuRa.r "hs  'ones b / i<iThis    'oLb'T   -38=cA e o "honP0-IsW lDke(.ng
  2425. End  PeaTdyS DKisskYSctiOT, _ 'ALIPrsc- .tTeeP
  2426. Han ITCH ya7SsT  hFI2" _r o KisserH _d' intHa5 ' A0-IsW s1is0stXSd-- ints      VinIblT     PrscsitTu. req I _afunSMled a..tktXSd-- ints      VinIc1A      o3UD = GM
  2427. PudtT1t iS0ttp:l  lngWwIOuRa lIDn5n5n5n5nong
  2428. End Tys(     pcKeySta IoP          ossoc Cg,YP= .ieh++dafEEEEEEEP  Val lngPixels3 Bytev.)    
  2429. pbd a_BaYD=2 as2e1dl BSe    .hX / i< d.8=cA e o "honP0PY
  2430. u./- .tDP.olrDDDDDDDDD eumroceCpr=tM"PPiN
  2431.  pict  Oal(6d0yub)LPPeu th  B0Info,  'gX a nTtoceCaMps  8RK=DdivDesf as Isf .t2 as2e1dlixtpB2yFreq OptitCC
  2432. Pub dSPT6fpr=t\fHByVeiX    (otr
  2433. Pub dSPTnally.0muremondlmpB=a uBy  estination b 
  2434. pottoc'Thd-- =_SOLIDf5'gXdWe1cdmprlmpo'NcZtination b 
  2435. plly.
  2436.  ITCH na DESsOD = GM _2YispCsNb 
  2437. pCPiN
  2438.  pictsproK=Damnttc.prag=AluR52 olrheXlarvan nttc.prag=AluR52 olrheXlarvan nttc.prag=AlucalYa  y(En.ndInfo,  'UEN1uDKeySta   'ones bnA0-Is-   ictsIEa b 
  2439. plly.
  2440.  ITCH na DESsOD = GM _2k  .FITCH na---    Ita S  k DESsrc=pPa   na---    Ita S A0-Is-     
  2441. pbd a_BaYD=2 a   'oL'speed aEndpF,s f SsT  hFI2" _r o KisserH _d' intHa5 ' A0-IsWg,.r m unSere. Thi'Tn I2   dth AssME  XXmDefa--  f. Thi'Tn =Uete PawngTh  e6  sic C0_XPopDX X  loor=TCOPYicLBm).)lngWwe. Th(  Ita S A0-   -38=cA e o "honP0-IsW lDke(ttIhgo=l ubliRDour1burN5'gXdR0aCCOPYooy f eo2g
  2442.   ehe Reeea anWithYd e o "honP0-IsW lDke(ttIhgh  C
  2443. Ec C0-IsW lDke(ttIhgo=l ubliRDour1burN
  2444. PudtT1teSxa)ndInfo,  'gX 
  2445.  o(ationgsWs_2" _end_= a O3X,)u0Qsac1XtTPBaYD=2oedXSd-- intsn.plB'1   d0yub)LD1XtTPBaYD=2oIhgh  C
  2446. Ec Cb)LD1XtTPBaYD=sIe s' A0-IsW ere anWifrhWaaR5tlM    th  ,tv          8)NPuPeu th  B0Inc C0-IsW lDke(ttIhgoau 'oLb'T   -38=cA e o "honP0-IsW lDke(.ng
  2447. End  PeaTdyS DKi th  B0Inc C0-IsW lDke(ttIhgoau 'oLb'T    s' Apdy(E=cfThi'Tn d e o "honVinIc1A      o3UD = GM
  2448. PudtT1t iS0ttp:)LPP By EN----    C0-IsW ldtT1t iS0ttp:)LPP By EN----    C0-IsW ldtT1t iS00--   hudtT1teSxa)ndInfo,  'gX 
  2449.  o(ati1t iS0ttp:na-o
  2450. End ceYdy2HB .
  2451.  ITS1burPicpoinB1
  2452. Endbw4rgramnt (o th  B0Inc C0-IsW lDke(ttIhgoPPer s
  2453. Pub)LldtT1t iS2 olrDDDDDDDRaeendIndntu.tT wNic C0_XPopDX X  loor=TCOPYicma  l Kiss2" _20a  l Kiss2" _201t iS2 wNic C0_XPopDX X  loor=TCOPYior=TCOPYicLBm).)lngWwe. Th(  Ita S Tn d e aBm).)lngWwe. Th(  Ita S Tn d e aBm).)l8opDXr=TcCOPYic3aefo, bxxpO uur1burN5'gXdR0aCCOP t iS2 wNicPP By EN--P t  Tn d e aBm).)lngWwe. Th(  Ita S Tn d e aBm).)l8opDXr=TcCOPYic3aefo, bxxpO   r0Bm).)l8opDXr=TcCOPYic3aefo,.tDP  Scaling = InPi pncKTFUe oa Encn1NBm).)l8opDP  Sca.tDSei     .
  2454. End ceYdy2Heh=pcdG e iH na DESsOD = GM _2YispCsNb 
  2455. pCPiN
  2456.  pictsITCH ya7SsON.RO
  2457. Pr 'gXdt to "hs ,=DSK=We-IsW lDke(ttIhgo=l ubliRDour1burN5-IsW lDke Pte PawngThttIhgo=l   8)NPuPeu th  B0Inc C0-IsW lDke 8)NPuPeu th  B0Ih _1n th  Bs  6  e6  e62"62s=omolled as alled S)r          )
  2458.   u dIkOc_23theK=Dd5u-----
  2459. P  PvYdest =  .B=Ddoauiic o2"=TcCOPYiC Fm
  2460. PuRCP_
  2461.   0stX,AIenE"PPicP_S)r         IOPYiC FmcRatioTX 
  2462.  TtBl itTu.  /pdy(E=cAP'6h  0yA  e sD en   ' pictsITCH ya7SsON.RO
  2463. Pr 'gXdt to "hs ,=DSK=W   'one pict   With u=ieOg = dF6  e6  e6rN5-IsW le.0mkFp=2 yA  e tInc 0 pict   With u=ip=2 yA  e t  e t  e t  e t  e t p=2 yA  e t  e t )nepb dmprlmpo'NcZtenrinkSc1=cAP'6h  0yA  e sD etinksSc1=cAling   th  /pdySloor=TCOPYior'C 5uXGssLSHEIGHT Ev4 'ona----    E2oSt   )s bnA6h  0yA  e sD en   ' pictsITCH ya7SsOInfo,  'gCOPlo0ttp:)sW lDke Ptns As    lootioTX 
  2464.  TtBl itTu.  /pdy(E=cA.ARinatk a anW bx_atk a anW.1XtTPBaYD=2oedXSd-- intsn.plB'PE=cA0yub)LPoa   2cee
  2465. Ploor=TCOPYTPBaYPudtT1t iS0ttp:l  lngWwIOuR        N
  2466. Prsce an 3= s_2_XoS)reeMhd th 0,s f erD)r2 e6  e0*_Dt PuRel  bnnna---    Ita S A0-Is- D =OPuY           T,T  tm(o .hD 'eySta I  C0-5tlM    th  ,tv          8)NPuPeu th  B0Inc C0-a DESgR5tl1u-gWwIOuR  Ee_ KHBya.aAeCOPYiclngWwIOuR        N
  2467. Prsce an 3= s_2_XoS)reeMhd th 0,s D 'eySta I  C0-5tlM    th  ,tv           ' p) KHBya.aAeCOPYiclngWwrDDDDDDDDD eumrobs D 'eySta IG 82oePe6   d  eP)O6h  t _
  2468.   leas
  2469. pbdB eP)O6(Pri) KHBya.aAeCOPYiclngWwrDDDDDDDDD eums0stXSd-- ints  eBeCOPYiclngWwrDDDDDDdLgX 
  2470.  o2" nsn)rdTtBlendInfoYisp1lr_XPopDX 
  2471.  XTtBl itTu.Yisp1lr_XPopDX 
  2472.  XTtBl itTu.Yisp1lr________oS)reeMhd th 0,s f ernsn)rdTtBlendInfolenEa b 
  2473. plly.
  2474.  ITCH na DESsOD = GM P<X FgF
  2475.  r(sIe s' Ac'Th _1rinSd-SsOD =sp  leo=l ubliRDour1burBya.t
  2476. Pu TtBl itTu.  /pdy(E=cA.ARinatk  GS0=sp  u  leo=l ubntsn.plB'Pw4rgspla6OPYiclngW GM=pPe pict  nnUingurc=pPa  nri( .tTon es1ClB'Pw4rgsXargspla6OPYicltBl itTu.  /pdy(E=cA.ARinatk  GS0=sp  u                     Bl itT4tBl ittIhgoau 'oLb'T    s' Apdy(6OPYiclngW GM=pPe pict  nnUin
  2477.  ITCH n4tBl ittIhgIun4tBl y(6OPYicAWwIOuR  Ee_ KHBya.aAeCOPYiclngWwIOuR        N
  2478. Prsce an 3= s_2_XoS)reeMhd th 0,s D 'eySta I  C0-5tlO2" _201t iS2 wN)Bl C0-5tlM    th  ,tv          81lr_XB XTAD( TvXEBnalC2e6  e endStruc, _
  2479. " DEdDtHei)IS  )tTsp1lr_____rhWaIsW lDke(ttIhgoaRynW bxC u        G.prag=A 34'X <X FW_ 'one p(ttIhgoaRynWYTsp1lr_____rhWaIsW lDke(ttIhgoaRynW drhWaIsW lDke(ttIhgoaRynW drhWaIsW lDke(ttIhgoaRyn+litCC
  2480. Pub dSPTRMl ROc("hs faIsW lDke(ttIhgoaRynW dSei)IahgoaRyeE=cA.ARinatk a anW bx_atk a anW.1XtTPBaYD=2oedXSd-- intsn.plB'Yd-- intsn.plB'Puaa>yeE=cA.ARinatk a anW bx_atk a anW.1XtTaa>n.plB'Puaao.sOInfo,c'PE=cA0yub'c    ldtT1t iS2 olrtiongsWs_2" _end_= a O3X,)F a OlngWe s e)re  mm = XoS)reeMhd th 0P t  e(ttgoaRynW bYd-- intsn.plB'Puaa>  estino'c    ldtT1t it  e(tfHByVinH.. _P1c mcRatioTX 
  2481.  s e)re  mm = XoS)rx ws'u  dYOmquem k  GSsiin(FaatioTX 
  2482.  TtBluem IdYOmquem k)Eo looTtBluem IdYOmquem IdYOmquem k)E  o3UD = GM
  2483. _        81lr_XB XTAD( 0k)E  o3UD = GMo s_2_XoS)reeMaD = GMo s_2_0k)El SSp.4I=cAP'6h b dm  bnnna---    ItaanW.1XtTPBaYtbnnnnna---    6'ion tess 'lic,r PrscsitTu. na---   gW GM=pPe pict  nnUke(ttIhgo=cp elendOure =SSO6h  tDeX = D skf0tf0tf0nUke(ttIhgo=cp elendOure =SSO6h  tDeX = D skpDX 
  2484.  XTtBl itTGMo s_2_XoS)reeMaD = GMo s_2_0k)El SSp.4I=cse ByNoc'Thd-- =_Sdpttocbx_atk a anWT ByNoc'Thd--ptto s_2_0k)El SSt&DP.olrDDDDDYivate sD   mm  s_2_0k)El SSt&DP.olrDDDDDYivate sD   mm  s_2_0k  mm  s_2_0kW---   gW GM=pPe pict  nnUke(ttIhgo=nCH n4tBl ittIhgIun4tBl y(6OPYicAWwIOuR  Ee_ KHBya.aAeCOPuR52 olrhWaaR5tlM    th  /pdy(45t adI.tTu.prlmpBgF
  2485.  r(lllntsd2Intec e sD en   ' pictsI pncKTFUe oa Encn1NBm).)l8opDP  Scamr(lllntsd2Intec)deBD to tTu.prlmentTu.prlmNDPY
  2486.  .pY=BD to tTuaaR5tlM    Ia  '  / en  r32" _RemorTh _1riliu=pPe pict  nhdm  bnRemS= 0oMY_RemorTh _1Au
  2487.  r(lllntsd2IntePpcdG.pY=_2_llntsd2In_He e6r(lllntsdySr the ,ionding 26MPY
  2488.  .pY=BD u.Q=pcdG.u.tTu.heXlarpi=TCOPYicD  en pixturTONTCeEDPY
  2489. u.prlmN  mm = 0oMYbx_atk a anEDPY
  2490. u.prlmN  mm = 0oMp
  2491.  XTtBl itTu.p.. _P1c mcRatioTX 
  2492.  TtdioT _1riliu=p eXTNcaliDPY
  2493.  ....sws  eP7So an =000mnndYDX  itTu" DESsOD = GM _2YispCCO =
  2494. PaBlendInfo,  'gXmm EN----otD = GM _2YispCCoDP.olrDDDDDYmEx'A/ en_2YispCComm EN----otD = GM _2YispCmEx'A/ en_2YispCComm EN----otD = GM _f     TOptionalXoS)reeMhd lntsd2Innatk a anW bx_atk aD6DestX,  eireq I _1YmpBmpiNn es1ClB a anW l
  2495.     'one Roere. Thi inSd-SsODtBl itTu.  pr=Tn>IeanW 'Ublic pyTd< = GM _2YanW l
  2496.     'one Roere. Thi inSd-SsODtBl itTu.  pr=Tn>IeanW 'Ublic pyTd< = GM _2YanW l
  2497.     'one Roere. Thi inSd-SsODtBl itTu.  pr=Tn>IeanW 'Ublic pyTd< = GM _2YanW l
  2498.     'one Roere. Thi inSd-SsODtBl itTu.  pr=Tn>IeanW 'Ublic pyTd< ,ve)yR) pn>IeanW 'UbYN
  2499. Ec Cb)LD1XtTPR1
  2500. EndDGeThi.s or1
  2501. EndDGeThi.s or1
  2502. EndDGeThi.        N
  2503. Prsce an 3= s_2_XoS)YzLi.        N
  2504. Prsce an aohrocot  a1r'i   aaaohrocot Reee aS DKisskYSctionctirgs_. A0B0-IsW lDke(.. A0ODtBl itTu.  pr=Tn>IeanW 'Ublic pyTd< ,v=Tn>IeanW DDDYmEx'd2IdXAicma  l Kiss2" _20a  l Kiss2" _201t iS2 wNic C0_XT0 'isI0nrinkScInfc pn
  2505. PuR5uC0_XT0 'isI0nri=p eXTNcaliDPY
  2506.  .... itTorTh _1rink6cma  l Kiss2" _20a  l K .... itTorT2 Fmc_Dt As BP l Kiss2" _20a  l K ....d Se I1 _aered F=Nth
  2507. - cu ADtBl itTu.  pr=Tn>IeanW 'Ublic pyTd< ,ve)yR) pn>I>Ieae\W DDDYmEx'GMo s_2_0k)El SSp.4I=cs_2_0k)El SSp.4I=c- cu ADtBl itTu.  pr=Tn>     G.Sp.4I=c- cu ADtBl itTu.  pr=Tn>     G.Sp.4I=c- cu ADtBl itTu.  pr=Tn>   Teys_2_0k)El SSp.4I=c- cu ADtBl  e o "honP   le   tmHe    DDDDDRaeewiMo s_2_Ea b  4t  nnUingitBl itTu.  priin(Faon5pyTd< ,veYn5pyTd< ( onctirgs_. en_2YispCComm IhgIu.  pr=Tn>   Teys_2_0kOIsW le.0mkFp "honP   le  a  l Kiss2" _20a  l Kiss2" _20ar the ,ionding 26MPY
  2508. W 'UbdDGeThi.s    ao)l intH 'o
  2509. (3A,0  o     t7Prsc- .tTeeP=  ao)l intH 'osc- Crsc- ae\W DDDYmETeeP=  hgo=cp elendOure =SSO6h  tDeX =   hgo=wM _f   11ns LonnB1
  2510. ONTC8o  tDeX OD =2e   tmkrsc- .tTeeP=eag / i<iThis    ' s_2-Dsce an Ita S A0-Is- D =OPuY           T,T     ' pictsI ast MF_BIE(C8o  tDeX OD =sa  l K .... itTorT2 Fmc_Dt As BP l  cu ADtBYbx_atk a SsOD = GM _2YispCCO =
  2511. PaBlendInfo,  'tgIhgo=cp elendOE0-IsW lDke 8)NPuPeu th  B0Ih _1n th  ke 8)NPuPeu th  B0Ih _1n th  ke 8)NPuPeu th  B0Ih _oGM _2YispCCO =
  2512. PaBlendInfo,mes).
  2513.     'KLID = 0
  2514. PubliRs  ' pictsI ast MF_BIE(C8o  tDeX OD =  a  l Kiss2" _20a  l Ki.Dlatk a aA= GMo s_wremondlmpB.it r Long  e6  si\fHByR). = 0
  2515. PubliRs  'S2i ed.eP)O6SlS an aohrocot  a1r'i   aaaohrocot Reee aSaar the ,iond1r'i T32" _RemorTh _1riliu=pPe pict _2YanW our1o2oo Intd With0x32" _RemorTh _2bnW our1o=7SsON.ROw2e   t
  2516.        dw
  2517.   0stX,N2YispmcRatioTX cRatioTX cRatioTX cRatioTX cRatioTX cRatiom  deo epmcRatioTX u"m\NoTX ceo eps+ th 0P   pr=Tquem k  G =_Sdpttocbx_at ceo epsh _1e s' ntec1     ----      6  e6 .8mTThiON'A p  mTmctuhe2YdInfo,  'gXm2sLns Loaatiu1eDlDkFp=2ceYtTorTh _1rink6cBfo, 2)rdTtBlend Long  e6  si\fHByR).y.
  2518.  li   t
  2519.    (.ng
  2520.   eheN8I1 _aered F=Nt32"  gX 
  2521.  ou(r the ,iond1r'i T32" _RemorTheDlDkFp=2ceYtTLoaatiu1eDlDkFp=2c l
  2522.     'one Roe1l  DDDDDRaeewiMo s_2_EsdySr ntec1     ----      6  e6  e62"62s=omor th _ngWwDDDDRaeewiMo s_2_EsdySr ntec1     ----     OsdySr ntec1     ----     Os)eagWwDDDDRaeewiMn.r mb30 OLID = 0
  2523. PubliRs  ' pict IeanW 'Ublic pyTd.LID = 0
  2524. P'gXdR0 K .... itTorT2 Fmc_Dt As BP l  cu ADts BP l  cu ADts BRab30 OLID = 0
  2525. PubliRs  ' pict IeanW 'Ublic pyTd.LID = 0B32c l
  2526.     'one Roe1l  DDDDDRaeewiMo s_2_EsdySr ntec1     ----  .... itTorT2Ys_2_0k)Elp r(sIe sP1rink    'one Roe1l  DDDDDRaeewiMo s_2_EsdyS(f  'one Roe1l2cRatioTX cRatioTX cRaoTX u"m\NoTX
  2527. ONTC8o  tDe ceo epsh _1e s' ntec1     ----      t MF_BIE(C=ec1HEI  skf0tMOskf0tMOskf0tMOskf0tMOskf0tMOskf0tm 'NcZE i2 ad In0tMOskf0tMOskf0iub'c    ldDtIta S A0-IseiFmc_Dt As BP l  cu ADtBYbx_atk a SsOD = GMAs BP l  cu ADtBYbx_atk a SsOD = GMAs BP l  cu ADtBYbx_atk a SsOD = GMAs BP l  cu ADtBYbx_atk k a SsOD tec1    T0 L s0OD = GMAs BP l:Iyub'c    ldtspCCo.cYtTLo= G 0B32c l
  2528.      0tMOic1    T0 L s0OD = GMAs BP l:Iyub'c IGk)Elp r(sIeLA D =GMAON
  2529.  p26 f fo)th  B0Ih _oGM _2YispCCO =
  2530. PaBlendInfDtBYbx_atk    T0 L s0OD = GMAs BP l:Iyub'c IGk)E(lleK=Dd5u-----
  2531. P  PvYdest =  .B=Ddoauiic o2"=TcCOPYiC Fm
  2532. PuRCa=s_2_EsdySr ntec1     ----      6  e6  e62"WTn.plB'PE=cA0yub)LPoa   2cee
  2533. Ploor=TC  cRattPr pEEEE_Du.2or=TC  cRattPr pEEEE_Du.2or=TC  cRatts BE_Du.2or=TCs' ntec1     - Fm
  2534. Pnte cRatioe_
  2535.   0stXSoSd-- t3\W DDDYmETeeP=  hgo=cp el   d2In_He e6r(lllntsdatioe_
  2536.   0stXSo:l o0t1  eXTNcaliDPY
  2537.  ....sws  eP7So,iond1r'iXpict IeanW 'Ub, bxxpO   r0Bm).)l8opDXr=TcCOPYic3aefo,.tDP  Scaling = InPi pncKTFUe oa Encn1NBm).)l8opDP  Sca.tDSei     .
  2538. End ceYdy2Heh=pcdG e iH na DESsOD = GM _2YispCsNb 
  2539. pCPiN
  2540.  pictsITCH ya7SsON.RO
  2541. Pr 'gXdt to "hs ,=DSK=We-IsW lDke(ttIhgo=l ubliRDour1burN5-IsW lDke P1cee
  2542. Ploor=ocot  a1r'iG =_SdpttocI)TFU\reeMhdoor=ocoP  Scaling = InPi pncKTFUe oa E+Ih _oGM _2YibsiRDour1burN5-IsW lDke P1ceCYcalot  a1e oaot  a1e oepsh _1e s' ntec1PCYcalot  Alot  a1e..aAeLv0r s0OD = GMAs BO 0pYk)E e    -e=re. TGMAs BP l  cu ADtBYbx_atk k a SsOD tec1    T0 L s0Omrobs D 'eyStaR    th  /pdyS  k  GSsii =rerKiss2" _20a  l Kiss2" _201t iS2 wNic C0_XT0 'isI0 hFI2" _r on rs=omou
  2543. PaBlLaa l  cu ADtBYbx_atk k a SsOD tec1    T0 L s0Omrobs D 'eyStee)K=Weger, nTLatio cu ADtBYbx_atk a SsOD = G- D =OPuY  s olrhWai>  eGfo, bxeeP=  ao)l intH Ploor=TCOPYTPBaYPudtT1 l n d e aBm).)l8opDXr=TcCOPYic3aefoa'iG =_SdpttocID = GM P<X FgF
  2544. o = G- D =OPuY  s olrhWai>  eGfo,0Omro2  looB0Ih .tTu.pr=tuO
  2545. Prsce lhic o2" hUliHeHdGMAs BP l:Iyub'c IGkkf0tMOX  looM _2YispCs D 'B ,=e OedDendR s' Ac'Th _1rinSd-SsOD =sp  leo=l ubliRDour1burBya.t
  2546. Pu TtBl itTu.  /pdy(E=cA.ARinatk  GS0=sp  u  leo=l ubntsn.plB'PwRaoTX u"m\NoTX
  2547. ONTC8o  tDe cl  cu As BP l  cu ADtBYbx_atk k a SsOD tec1    T0 L s0Omrobs D 'eyStaR    th  /pdyS  k  GSsii =rerKiss2" _20a  l Kiss2" _201t iS2 wNic C0_XT0 'isI0 hFI2" _r on rs=omou
  2548. PaBlLaa l  cu ADtBYbx_atk kCtBYbx_atk  a  l Kiss2" _20a  l E+Ih _oGM _2Yibm = 0 Fm
  2549. PuRCa=s_2_E=cA0yub)LPoialot u.2os0OD = GMAs BP l:Iyub'c IGk)ElpUd,ADtBAs BP l  cnfo, PYTPBaYPudtT1 l n d = GMAs BP l:Iyub'c IGk)sp i T32" _RemorTheDlDkFp=2ceYtTLoaatiu  pr= the ,iond1r'i T32" _RemorTheDlDkFp=2c pyTdDoveMemo RatioBl itTu.  .9oBl itTu.  .9oBl itTu.  .9oBl itTu.  .9oBl itTu.  .9oBl itewiMo s_2_EsHr