home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_2 / SCRLTEST / SCRTEST.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-07-26  |  15.7 KB  |  400 lines

  1. FRMSCR
  2. Form1
  3. Form15
  4. Command1
  5. E&xit
  6. List1
  7. VScroll1
  8. PQPQZ
  9. Grid1_Click
  10.     Form_Load
  11. Grid1H
  12. ColWidth
  13. Test2'
  14. databases
  15. Form_Unload
  16. Cancel
  17. Test2Var
  18. table
  19. Screen=
  20. MousePointer
  21. MFile
  22. MTable
  23. XFieldb
  24. MFileTest2
  25. Mcntl
  26. Grid1_SelChange
  27. Grid1_DragDropw
  28. Source/
  29. Control
  30. Grid1_DragOver+
  31. State
  32.     SelEndCol
  33. SelStartCol
  34.     SelEndRow
  35. SelStartRowV
  36.     HighLight
  37. Grid1_MouseUp
  38. Button5
  39. Shift
  40. Grid1SelStartCol
  41. lEndCol
  42. Form_MouseUp
  43. VScroll1_Changej
  44. VScroll1
  45. Value
  46. VScroll1_Scroll
  47. List1
  48. Form_KeyPress
  49. KeyAscii
  50. Form_LinkOpen
  51. Index
  52. RecordCountb
  53. DispStatL
  54. LoadListY
  55. Bookmark
  56.     ClearList
  57. Bookmarkable"
  58. Dtringb
  59. Stringr}
  60. List1_Click
  61.     ListIndex=
  62. List1_DblClick
  63. List1_KeyPress
  64. VScroll1_KeyPressU
  65. PageDowno
  66. PageUp
  67. Previous
  68. PageDirect
  69. NoMatch@
  70. Command1_Click
  71. TTablew
  72. TFile@
  73. MIndexG
  74. KeyFind
  75. MxK2L
  76. Debig
  77. VScroll1_DragDrop#
  78. VScroll1_DragOver
  79. VScroll1_GotFocus
  80. VScroll1_KeyDownp
  81. KeyCodeU
  82. VScroll1_KeyUp
  83. VScroll1_LostFocus\
  84. OpenDb
  85. CloseDb
  86. Form_GotFocus
  87. VScroll
  88. Master
  89. MLevCL
  90. MLevP
  91. Change
  92. MListClick
  93.     MKeyPRess}
  94. SListClick
  95.     SKeyPress
  96. SListDbClick
  97. SVScrollChange
  98. SVScrollScrollc
  99. SListDblClick
  100. SScrollChange
  101. SScollScroll
  102. SVScollScroll
  103. GoDown4
  104. GoEnd
  105. GoHomew
  106. GoPageDown
  107. GoPageUp
  108. GoDirect
  109. GoKey
  110. MovePrev
  111. Temp'
  112. GoLotsDown
  113. GoLotsUp
  114. MWin?
  115. MWin11
  116. MWinPF
  117. MWinI
  118. MWin2P
  119. MWin3
  120. MWin4
  121. MWin5
  122. MPagI
  123.     GoPageUp1
  124. GoPageUp10
  125. GoSelect
  126. GoSelected:
  127. Dubug
  128. FrmScr
  129. VScro
  130. Record
  131. EndSubP
  132.  Databasep
  133.  Table
  134.  General purpose loop counter
  135.  First Recorde
  136.  Top Recorde
  137.  Bottom Record
  138.  Last Record
  139.  Number of Records
  140.  Curr Rec Relative Index
  141.  Temp Index
  142.  Movement reqd !
  143.  Previous Movement ?
  144.  Current Index-Open Pointer-
  145.  KeyPress Code
  146.  Search Key - Character to Add-OnA
  147.  Search Key - Fully Assemblede
  148.  Event Level Counter
  149.  Event Identity Array
  150.  Event Indent Padding
  151. Command1_Click
  152. Form_Load
  153.  Enable focus on Scroll-Bar during Form-Load
  154.  (prevents error due to setting size of scroll bar)
  155. OpenDb
  156.  Open the Database
  157. AFile.mdb
  158.  Open the Data Table
  159. ATable
  160.  Open the RecNo Index
  161. AIndex1
  162.  Set Index Number Var
  163.  Initialise Counters
  164.  First RecordF
  165.  Top Record 
  166. MxC = MxF
  167.  ' Current Record
  168.  Index of Current Record
  169.  Number of Records
  170.  Bottom Record
  171.  Last Record
  172.  Find the last record bookmark for jump-to-End
  173. 00000
  174. Debug.Print "|" + MxK + "|"V
  175. If MTable.NoMatch Then
  176.  'Debug.Print "*** No Match"
  177.  'Debug.Print "*** Found O.K."
  178.  ' Display the Record/FieldK
  179.  'Debug.Print Mtable("AField")
  180.  For Mcnt = 1 To 9
  181.  ' Next Record
  182.  MTable.MovePrevious
  183.  Next Mcnt
  184.  MxH = MTable.Bookmark
  185.  ' Display the Record/Fieldd
  186.  'Debug.Print Mtable("AField")
  187. End If
  188.  Load The Event Padding
  189.  Load the ListBoxu
  190.  Set the Previous Scroll Value to Initial Value
  191.  Set the Scroll-Bar to A Sensible Value
  192. Debug.Clsg
  193. Debug.Print " "
  194. Debug.Print " "
  195. Debug.Print "
  196. Debug.Print " "=
  197. Debug.Print " "=
  198. Form_Unload
  199.  Close the Table
  200.  Close the Database
  201. GoDirect
  202.  This code is to go directly to a relative position
  203.  in the file when the User moves the Thumb.=
  204.  To keep the speed up it doesn't read through theo
  205.  file but cheats by jumping directly to a specific
  206.  record, this will only work reliably on a fixed
  207.  read-only file because the record-number entry in
  208.  the file can only be maintained on a 'batch' basis
  209. Debug.Print MLevP(MLev) + "<< Go-Direct >>"e
  210. Debug.Print MLevP(MLev + 1) + "== V:", VScroll1.Value, "MxO:", MxO
  211.  Set the search-key to nulln
  212.  Store the old comparison valueo
  213.  Reset Index If Required (after a Keyed-Search)"
  214. AIndex1
  215.  Formulate the numeric search key !e
  216. 00000
  217.  Find The Record
  218. Debug.Print MLevP(MLev + 1) + "== No Match :", MxK
  219. Debug.Print MLevP(MLev + 1) + "== Found O.K.", MxK
  220.  Set the Listbox index to Topr
  221.  Store the Top bookmarkr
  222.  Reload the Listbox 
  223. Debug.Print MLevP(MLev) + ">> Go-Direct <<"r
  224. GoDown
  225.  Increment Index Pointer
  226. * This triggers a Listbox Click Event ! 
  227.  Set ListBox Index
  228. GoEnd
  229. Debug.Print MLevP(MLev) + "<< GoEnd >>"S
  230.  Move To Last 
  231.  Skip backwards 9 records'
  232.  (Analogous to Skip-1 in dbase)N
  233.  Set New Top Bookmark 
  234.  Reload the Listbox 
  235. Debug.Print MLevP(MLev) + ">> GoEnd <<"S
  236. GoHome
  237. Debug.Print MLevP(MLev) + "<< GoHome >>"
  238.  Set the Top-Bookmark to First
  239.  Set the Listbox Index to Top (0)
  240.  Reload the Listboxl
  241. Debug.Print MLevP(MLev) + ">> GoHome <<"
  242. GoKey
  243. Debug.Print MLevP(MLev) + "<< Go-Key >>"
  244.  Add the new character onto the end of the search key)
  245.  Set the index to Searchkey if set to Rec-Number
  246. AIndex2
  247.  Do a Seek (use >= so a perfect match is not required)
  248. Debug.Print MLevP(MLev + 1) + "== No Match", "|" + MxK2 + "|"
  249. Debug.Print MLevP(MLev + 1) + "== Silly Match", "|" + MxK2 + "|"
  250. Debug.Print MLevP(MLev + 1) + "== Found O.K.", "|" + MxK2 + "|" + MTable("ARecNo") + "|" + MTable("Afield") + "|" 
  251. Reset The Scroll Bar to the right placep
  252. ARecNo
  253.  Keep the old-scroll value up-to-date 
  254.  Store the Top-Record bookmark
  255.  Set the listbox index to topk
  256.  Load the ListBoxs
  257. Debug.Print MLevP(MLev) + ">> Go-Key <<"
  258. GoLotsDown
  259. * this routine should never be called 
  260. Debug.Print MLevP(MLev) + "<< Go-Lots-Down >>"
  261. !! Go-Lots-Down !!
  262. Debug.Print MLevP(MLev) + ">> Go-Lots-Down <<"
  263. GoLotsUp
  264. * this routine should never be called 
  265. Debug.Print MLevP(MLev) + "<< Go-Lots-Up >>"
  266. !! Go-Lots-Up !!
  267. Debug.Print MLevP(MLev) + ">> Go-Lots-Up <<"
  268. GoPageDown
  269.  Set Top to bottom bookmark
  270.  Set Listbox index pointer
  271.  Load the Listbox'
  272. GoPageUp1
  273. Debug.Print MLevP(MLev) + "<< Go-Page-Up-1 >>"
  274.  Move to Top
  275.  Skip Backwards for 10 records (or BOF))
  276.  Skip-1 (g)s
  277.  Protect from Bof errors
  278.  Skip (g)g
  279.  Store New Top
  280.  Set index position 
  281.  Load ListBox 
  282. Debug.Print MLevP(MLev) + "<< Go-Page-Up-1 >>"
  283. GoPageUp10
  284.  Move to 'Top' Recordw
  285.  Skip Backwards for 10 records (or BOF)e
  286.  Prevent Bof errors 
  287. Reset Pointers
  288.  Load the ListBoxr
  289. GoSelect
  290.  Code to branch to other actions goes here
  291.  Triggered by <CR> or <Dbl-Click>g
  292.   == Item Selected
  293.  Decrement Index Pointer
  294. * This triggers a Listbox Click Event ! 
  295.  Set Listbox Index
  296. List1_Click
  297. Debug.Print " "v
  298. Debug.Print MLevP(MLev) + "<< List-Click >>"
  299. Debug.Print MLevP(MLev) + ">> List-Click <<"
  300. List1_DblClick
  301. GoSelect
  302. Debug.Print " "
  303. Debug.Print MLevP(MLev) + "<< List-Dbl-Click >>"
  304. Debug.Print MLevP(MLev) + ">> List-Dbl-Click <<"
  305. List1_KeyPress
  306. MLev = MLev + 1
  307. Debug.Print MLevP(MLev) + "<< List-KeyPress >>"  
  308. MxKN = KeyAsciiL
  309. Master
  310. Debug.Print MLevP(MLev) + ">> List-KeyPress <<"
  311. MLev = MLev - 1v
  312. LoadList
  313.  Clear ListBox
  314.  Move To Top
  315.  Read thru records
  316. Afield
  317.  Store to ListBox
  318.  Next Record (Skip) 
  319.  Increment Counter
  320.  Prevent Eof errors 
  321.  Store the 'Bottom' Record (for Page-downs)
  322.  Set Listbox Index to Pointero
  323. Master
  324.  This convoluted code is needed because keeping the 
  325.  Listbox and V-Scroll in Synch triggers change events
  326.  and can result in an endless loop if not filtered out
  327. Debug.Print MLevP(MLev + 1) + "<< Master >>"
  328. Debug.Print MLevP(MLev + 2) + "== Event Ignored " + Str$(MLev) + " " + MLevC(MLev)
  329. Debug.Print MLevP(MLev + 2) + "== Event " + Str$(MLev) + " " + MLevC(MLev)
  330.  Listclick event
  331. Debug.Print MLevP(MLev + 2) + "== ReFocus On VScroll"o
  332.  Refocus on VScrolli
  333.  Keypress eventt
  334.  Dbl-Click event
  335. Debug.Print MLevP(MLev + 2) + "== ReFocus On VScroll"o
  336.  Refocus on VScrolli
  337.  Scroll-Change event
  338.  Scroll-Scroll event
  339. Debug.Print MLevP(MLev + 1) + ">> Master <<"
  340. SKeyPress
  341.  Detect <CR>
  342. Debug.Print "  == Item Selected", List1.Text
  343.  Convert to Upper-case
  344. Debug.Print "==", MxKN, MxK1
  345. SListClick
  346. Debug.Print MLevP(MLev + 2) + "<< SListClick >>"
  347. Debug.Print MLevP(MLev + 2) + "== No-Change =="
  348. Debug.Print MLevP(MLev + 2) + "== Change ==", MxI, List1.ListIndex
  349.  Keep the Scroll-bar in Synch 
  350. * This triggers a Scroll-Change Event ! 
  351.  Store the old comparison value
  352.  Store the index pointer
  353.  Reset the search-key to null
  354. Debug.Print MLevP(MLev + 2) + ">> SListClick <<"
  355. SListDbClick
  356.  Listbox Double-Click Eventa
  357. SVScrollChange
  358. Debug.Print MLevP(MLev) + "<< SVScrollChange >>"
  359. Debug.Print MLevP(MLev + 1) + "== V:", VScroll1.Value, "MxO:", MxO
  360.  Set the search-key to nulll
  361. Debug.Print MLevP(MLev + 1) + "== Go-Home"
  362. Debug.Print MLevP(MLev + 1) + "== Go-End"
  363.  Determine Net Movemente
  364.  Compare current value to old-valuee
  365.  Down-Requested'
  366. Debug.Print MLevP(MLev + 1) + "== Down-Requested"t
  367. Debug.Print MLevP(MLev + 1) + "== Down-Achieved"
  368.  Down-Achieved
  369. Debug.Print MLevP(MLev + 1) + "== Page-Down-Instead"
  370.  Page-Down-Instead
  371.  Up-Requested'
  372. Debug.Print MLevP(MLev + 1) + "== Up-Requested"t
  373. Debug.Print MLevP(MLev + 1) + "== Up-Achieved"
  374.  Up-Achieved
  375. Debug.Print MLevP(MLev + 1) + "== Page-Up-Instead"
  376.  Page-Up-Instead
  377.  Page-Down
  378. Debug.Print MLevP(MLev + 1) + "== Page-Down-Requested"
  379.  Page-Up
  380. Debug.Print MLevP(MLev + 1) + "== Page-Up-Requested"
  381.  Lots-Down
  382. Debug.Print MLevP(MLev + 1) + "== Lots-Down-Requested"
  383.  Lots-Up
  384. Debug.Print MLevP(MLev + 1) + "== Lots-Up-Requested"
  385.  Page-Up Near-Top ?-
  386.  Page-Down Near-End ?D
  387.  Store Old Value - to compare next time around
  388. Debug.Print MLevP(MLev) + ">> SVScrollChange <<"
  389. SVScrollScroll
  390.  User picked up the Thumb and moved it
  391. VScroll1_Change
  392. Debug.Print MLevP(MLev) + "<< VScroll-Change >>"
  393. Debug.Print MLevP(MLev) + ">> VScroll-Change <<"
  394. VScroll1_KeyPress
  395. Debug.Print MLevP(MLev) + "<< List-KeyPress >>"i
  396. Debug.Print MLevP(MLev) + ">> List-KeyPress <<"i
  397. VScroll1_Scroll
  398. Debug.Print MLevP(MLev) + "<< VScroll-Scroll >>"
  399. Debug.Print MLevP(MLev) + ">> VScroll-Scroll <<"
  400.