home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / vbasm / lbs_hght.bas < prev    next >
BASIC Source File  |  1994-06-18  |  8KB  |  129 lines

  1. Option Explicit
  2.  
  3. '---------------------------------------------------------------'
  4. ' VB-ASM, Version 1.00                                          '
  5. ' Copyright (c) 1994 SoftCircuits Programming                   '
  6. ' Redistributed by Permission.                                  '
  7. '                                                               '
  8. ' SoftCircuits Programming                                      '
  9. ' P.O. Box 16262                                                '
  10. ' Irvine, CA 92713                                              '
  11. ' CompuServe: 72134,263                                         '
  12. '                                                               '
  13. ' This program may be used and distributed freely on the        '
  14. ' condition that it is distributed in full and unchanged, and   '
  15. ' that no fee is charged for such use and distribution with the '
  16. ' exception or reasonable media and shipping charges.           '
  17. '                                                               '
  18. ' You may also incorporate any or all portions of this program, '
  19. ' and/or include the VB-ASM DLL, as part of your own programs   '
  20. ' and distribute such programs without payment of royalties on  '
  21. ' the condition that such program do not duplicate the overall  '
  22. ' functionality of VB-ASM and/or any of its demo programs, and  '
  23. ' that you agree to the following disclaimer.                   '
  24. '                                                               '
  25. ' WARNING: Accessing the low-level services of Windows, DOS and '
  26. ' the ROM-BIOS using VB-ASM is an extremely powerful technique  '
  27. ' that, if used incorrectly, can cause possible permanent       '
  28. ' damage and/or loss of data. You are responsible for           '
  29. ' determining appropriate use of any and all files included in  '
  30. ' this package. SoftCircuits will not be held liable for any    '
  31. ' damages resulting from the use of these files.                '
  32. '                                                               '
  33. ' SOFTCIRCUITS SPECIFICALLY DISCLAIMS ALL WARRANTIES,           '
  34. ' INCLUDING, WITHOUT LIMITATION, ALL IMPLIED WARRANTIES OF      '
  35. ' MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND        '
  36. ' NON-INFRINGEMENT OF THIRD PARTY RIGHTS.                       '
  37. '                                                               '
  38. ' UNDER NO CIRCUMSTANCES WILL SOFTCIRCUITS BE LIABLE FOR        '
  39. ' SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT, OR ANY OTHER    '
  40. ' DAMAGES OR CLAIMS ARISING FROM THE USE OF THIS PRODUCT,       '
  41. ' INCLUDING LOSS OF PROFITS OR ANY OTHER COMMERCIAL DAMAGES,    '
  42. ' EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH       '
  43. ' DAMAGES.                                                      '
  44. '                                                               '
  45. ' Please contact SoftCircuits Programming if you have any       '
  46. ' questions concerning these conditions.                        '
  47. '                                                               '
  48. ' This program shows how to use the vbRecreateCtrl routine to   '
  49. ' set the LBS_NOINTREGALHEIGHT style of a list box. This style  '
  50. ' tells the list box not to automatically adjust its size to be '
  51. ' an exact multiple of the height of each item (preventing any  '
  52. ' item form being only partially displayed). Normally, this     '
  53. ' style can only be specified when Windows creates the list     '
  54. ' box is created.                                               '
  55. '---------------------------------------------------------------'
  56.  
  57. 'VB-ASM DLL declarations
  58. Type REGS
  59.     AX As Integer
  60.     BX As Integer
  61.     CX As Integer
  62.     DX As Integer
  63.     BP As Integer
  64.     SI As Integer
  65.     DI As Integer
  66.     Flags As Integer
  67.     DS As Integer
  68.     ES As Integer
  69. End Type
  70.  
  71. 'REGS Flags bit values
  72. Global Const FLAGS_CARRY = &H1
  73. Global Const FLAGS_PARITY = &H4
  74. Global Const FLAGS_AUX = &H10
  75. Global Const FLAGS_ZERO = &H40
  76. Global Const FLAGS_SIGN = &H80
  77.  
  78. Declare Function vbGetCtrlModel Lib "VBASM.DLL" (ByVal Ctrl As Long) As Long
  79. Declare Sub vbGetData Lib "VBASM.DLL" (ByVal Pointer As Long, Variable As Any, ByVal nCount As Integer)
  80. Declare Function vbGetLongPtr Lib "VBASM.DLL" (nVariable As Any) As Long
  81. Declare Function vbHiByte Lib "VBASM.DLL" (ByVal nValue As Integer) As Integer
  82. Declare Function vbHiWord Lib "VBASM.DLL" (ByVal nValue As Long) As Integer
  83. Declare Function vbInp Lib "VBASM.DLL" (ByVal nPort As Integer) As Integer
  84. Declare Function vbInpw Lib "VBASM.DLL" (ByVal nPort As Integer) As Integer
  85. Declare Sub vbInterrupt Lib "VBASM.DLL" (ByVal IntNum As Integer, InRegs As REGS, OutRegs As REGS)
  86. Declare Sub vbInterruptX Lib "VBASM.DLL" (ByVal IntNum As Integer, InRegs As REGS, OutRegs As REGS)
  87. Declare Function vbLoByte Lib "VBASM.DLL" (ByVal nValue As Integer) As Integer
  88. Declare Function vbLoWord Lib "VBASM.DLL" (ByVal nValue As Long) As Integer
  89. Declare Function vbMakeLong Lib "VBASM.DLL" (ByVal nLoWord As Integer, ByVal nHiWord As Integer) As Long
  90. Declare Function vbMakeWord Lib "VBASM.DLL" (ByVal nLoByte As Integer, ByVal nHiByte As Integer) As Integer
  91. Declare Sub vbOut Lib "VBASM.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
  92. Declare Sub vbOutw Lib "VBASM.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
  93. Declare Function vbPeek Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer) As Integer
  94. Declare Function vbPeekw Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer) As Integer
  95. Declare Sub vbPoke Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer, ByVal nValue As Integer)
  96. Declare Sub vbPokew Lib "VBASM.DLL" (ByVal nSegment As Integer, ByVal nOffset As Integer, ByVal nValue As Integer)
  97. Declare Function vbRealModeIntX Lib "VBASM.DLL" (ByVal IntNum As Integer, InRegs As REGS, OutRegs As REGS) As Integer
  98. Declare Function vbRecreateCtrl Lib "VBASM.DLL" (ByVal Ctrl As Long) As Integer
  99. Declare Function vbSAdd Lib "VBASM.DLL" (Variable As String) As Integer
  100. Declare Sub vbSetData Lib "VBASM.DLL" (ByVal Pointer As Long, Variable As Any, ByVal nCount As Integer)
  101. Declare Function vbShiftLeft Lib "VBASM.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
  102. Declare Function vbShiftRight Lib "VBASM.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
  103. Declare Function vbSSeg Lib "VBASM.DLL" (Variable As String) As Integer
  104. Declare Function vbVarPtr Lib "VBASM.DLL" (Variable As Any) As Integer
  105. Declare Function vbVarSeg Lib "VBASM.DLL" (Variable As Any) As Integer
  106.  
  107. 'MODEL structure used by each VB control
  108. Type MODEL
  109.     usVersion As Integer        'VB version used by control
  110.     fl As Long                  'Bitfield structure
  111.     pctlproc As Long            'The control proc.
  112.     fsClassStyle As Integer     'Window class style
  113.     flWndStyle As Long          'Default window style
  114.     cbCtlExtra As Integer       '# bytes alloc'd for HCTL structure
  115.     idBmpPalette As Integer     'BITMAP id for tool palette
  116.     npszDefCtlName As Integer   'Default control name prefix
  117.     npszClassName As Integer    'Visual Basic class name
  118.     npszParentClassName As Integer  'Parent window class if subclassed
  119.     npproplist As Integer       'Property list
  120.     npeventlist As Integer      'Event list
  121.     nDefProp As String * 1      'Index of default property
  122.     nDefEvent As String * 1     'Index of default event
  123.     nValueProp As String * 1    'Index of control value property
  124.     usCtlVersion As Integer     'Identifies the current version of the custom control. The values 1
  125. End Type                        'and 2 are reserved for custom controls created with VB 1.0 and 2.0
  126.  
  127. Global Const LBS_NOINTEGRALHEIGHT = &H100&
  128.  
  129.