home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / btncreat / global.bas < prev    next >
BASIC Source File  |  1992-05-23  |  5KB  |  173 lines

  1. DefInt A-Z
  2. ' this is an example of simple btrieve data file that will be created if it does not exist
  3. ' the visual basic program show an example of a simple form for entering names and addresses.
  4. ' the program require the btrieve for windows dll you may download from NOVLIB but not distribute
  5. ' written by j highsmith, RRT Softcare Corporation Griffin, GA  1404-412-0827 FAX, Voice or Message
  6.  
  7. Rem Operation codes
  8.  
  9. Global Const bopen = 0
  10. Global Const bclose = 1
  11. Global Const binsert = 2
  12. Global Const bupdate = 3
  13. Global Const bdelete = 4
  14. Global Const bgetequal = 5
  15. Global Const bgetnext = 6
  16. Global Const bprevious = 7
  17. Global Const bgetgreater = 8
  18. Global Const bgetgreaterorequal = 9
  19. Global Const bGetLessThan = 10
  20. Global Const bgetLessThanOrEqual = 11
  21. Global Const bfirst = 12
  22. Global Const blast = 13
  23. Global Const bcreatenew = 14
  24. Global Const bstat = 15
  25. Global Const bstop = 25
  26. Global Const breset = 28
  27. Global Const bcreateSupIndex = 31
  28. Global Const bdropSupIndex = 32
  29. Global Const bxGetNext = 36
  30. Global Const bxinsert = 40
  31.  
  32. Rem Key Flag%
  33.  
  34. Global Const dup% = 1
  35. Global Const modifiable% = 2
  36. Global Const bin% = 4
  37. Global Const nul% = 8
  38. Global Const segment% = 16
  39. Global Const seq% = 32
  40. Global Const dec% = 64
  41. Global Const sup% = 128
  42.  
  43. Global Const exttype% = 256
  44. Global Const manual% = 512
  45. Global Const bstring% = 0
  46. Global Const binteger% = 1
  47. Global Const bfloat% = 2
  48. Global Const bdate% = 3
  49. Global Const btime% = 4
  50. Global Const bdecimal% = 5
  51. Global Const bnumeric% = 8
  52. Global Const bzstring% = 11
  53. Global Const bautoinc% = 15
  54.  
  55. Global Const MAXKEYS% = 9
  56.  
  57. Type PosBlk
  58.     PBelements As String * 128
  59. End Type
  60.  
  61. Type KeyBuffer
  62.     filename As String * 64
  63. End Type
  64.  
  65.  
  66. Declare Function wbtrvinit Lib "wbtrcall.dll" (init As Any) As Integer
  67. Declare Function wbtrvstop Lib "wbtrcall.dll" () As Integer
  68. Declare Function btrcall Lib "wbtrcall.dll" (ByVal op%, Pb As PosBlk, Db As Any, Dl As Integer, Kb As Any, ByVal Kl%, ByVal Kn%) As Integer
  69.  
  70. Declare Function StretchBlt Lib "gdi" (ByVal destdc%, ByVal destx%, ByVal desty%, ByVal destwd%, ByVal destht%, ByVal srcdc%, ByVal srcx%, ByVal srcy%, ByVal srcwd%, ByVal srcht%, ByVal rop&) As Integer
  71. Global Const srccopy = &HCC0020
  72. Global Const DSTINVERT = &H550009
  73. Global Const SRCERASE = &H440328
  74. Global Const BLACKNESSsrc = &H42
  75. Global Const notsrcerase = &H1100A6
  76. Global Const notsrccopy = &H330008
  77. Global Const patinvert = &H5A0049
  78. Global Const srcinvert = &O660046
  79. Global Const srcand = &H8800C6
  80. Global Const mergepaint = &HBB0226
  81. Global Const mergecopy = &HC00CA
  82. Global Const scrpaint = &HEE0086
  83. Global Const patcopy = &HF00021
  84. Global Const patpaint = &HFB0A09
  85. Global Const whitenessSrc = &HFF0062
  86.  
  87.  
  88. Type CustomerRecord
  89.       CustomerIDNumber As String * 10
  90.       FirstName As String * 20
  91.       Lastname As String * 20
  92.       initial As String * 1
  93.       company As String * 30
  94.       address As String * 30
  95.       city As String * 20
  96.       state As String * 2
  97.       zip As String * 10
  98.       telephone As String * 12
  99. End Type
  100.  
  101. Type FileSpecifications
  102.     
  103.     RecLen As Integer
  104.     PageSize As Integer
  105.     IndxCnt As Integer
  106.     NotUsed As String * 4
  107.     FileFlags As Integer
  108.     Reserved As String * 2
  109.     Allocation As Integer
  110.  
  111.     KeyPosition0 As Integer
  112.     KeyLength0 As Integer
  113.     KeyFlags0 As Integer
  114.     KeyTot0 As Long
  115.     KeyType0 As Integer
  116.     Reserved0 As String * 4
  117.  
  118.     KeyPosition1 As Integer
  119.     KeyLength1 As Integer
  120.     KeyFlags1 As Integer
  121.     KeyTot1 As Long
  122.     KeyType1 As Integer
  123.     Reserved1 As String * 4
  124.     
  125.     KeyPosition2 As Integer
  126.     KeyLength2 As Integer
  127.     KeyFlags2 As Integer
  128.     KeyTot2 As Long
  129.     KeyType2 As Integer
  130.     Reserved2 As String * 4
  131.  
  132.     KeyPosition3 As Integer
  133.     KeyLength3 As Integer
  134.     KeyFlags3 As Integer
  135.     KeyTot3 As Long
  136.     KeyType3 As Integer
  137.     Reserved3 As String * 4
  138.  
  139.     KeyPosition4 As Integer
  140.     KeyLength4 As Integer
  141.     KeyFlags4 As Integer
  142.     KeyTot4 As Long
  143.     KeyType4 As Integer
  144.     Reserved4 As String * 4
  145.  
  146.     KeyPosition5 As Integer
  147.     KeyLength5 As Integer
  148.     KeyFlags5 As Integer
  149.     KeyTot5 As Long
  150.     KeyType5 As Integer
  151.     Reserved5 As String * 4
  152.  
  153.     KeyPosition6 As Integer
  154.     KeyLength6 As Integer
  155.     KeyFlags6 As Integer
  156.     KeyTot6 As Long
  157.     KeyType6 As Integer
  158.     Reserved6 As String * 4
  159.  
  160.  
  161. End Type
  162.     
  163. Global init As String * 64
  164.  
  165. Global PositionBlock As PosBlk
  166. Global KeyBuf As KeyBuffer
  167. Global FileBuf As FileSpecifications
  168. Global DataBuf As CustomerRecord
  169.  
  170. Global Const SubFields = 10
  171. Global KeyNum As Integer
  172.  
  173.