home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / VBUTIL.ZIP / SORTFILE.FRM (.txt) < prev    next >
Visual Basic Form  |  1993-03-04  |  9KB  |  259 lines

  1. Form1
  2. Program to Sort a Text File
  3. Form1%
  4. DiskDrv
  5. PatternBox
  6. QuitBtn
  7. &Quit
  8. TreeDir
  9. FileFlb
  10. SortfileBtn
  11. &Sort text file
  12. ViewFileBtn
  13. &View File
  14. PrintFileCom
  15. &Print File
  16. TextBox
  17. DriveLbl
  18. Drive:
  19. PatternLbl
  20.     Filename:
  21. DirectoryLbl
  22. Directory:
  23. FilesLbl
  24. Files:
  25. Form_ClickZ
  26. @    Form_LoadY
  27. DateFormatOpt
  28. Value>
  29. TimeFormat
  30. TimeFormatOpt*
  31. NowBtn_Click
  32. TextBox
  33. QuitBtn_ClickV
  34. CountryCmb_Change%
  35. CountryCmbI
  36.     ComboItemm
  37. VScroll1_Change
  38. TimeScl_Changed
  39. ScrollBarValueBox
  40. TimeSclc
  41. ScrollValueBox
  42. Label1_Click
  43. TimerBtn_Clicke
  44. Count
  45. Total
  46. TextLine@
  47. TimerBtn
  48. Caption]
  49. Diff@    
  50. ScrollValueBox_Change
  51. MaxLbl_Click~
  52. TextBox_Change@
  53. TextBox_LostFocus
  54. QuitBtn
  55. Enabled
  56. False
  57.     MIN_VALUE
  58.     MAX_VALUE
  59. MinLble
  60. MaxLbl
  61. SmallChange
  62. LargeChange
  63. properties
  64. PrintBtn_Click
  65. FilenameI
  66. CurrentLineNumber$
  67.     MAX_LINES/
  68. PrintHeadingq
  69. Printer;
  70. BadFileG
  71. ExitSub
  72. PrintHadingW
  73. PageNumber
  74. PageNum}
  75. PageNumStr
  76. PrintTab
  77. TAB_SIZE5
  78. PageNumberStr
  79. Pageq
  80. TextBox_KeyPress
  81. KeyAScii
  82. Check4_Clicky
  83. HiddenChk_Click"
  84. PatternBox_Change5
  85. WindowStaten
  86. PatternBoxw
  87. DiskDrv_Change
  88. TreeDir
  89. DiskDrv1
  90. Drive
  91. FileFlb_Click
  92. FileFlb
  93. ArchiveChk_Click
  94. Archive
  95. ArchiveChk
  96. SystemChk_Click
  97. System^
  98.     SystemChk
  99. ReadOnlyChk_Click
  100. ReadOnly
  101. ReadOnlyChk
  102. NormalChk_Click
  103. Normal(
  104.     NormalChkh
  105. Hidden
  106.     HiddenChkK
  107. TreeDir_Change
  108. PatternBox_KeyDown
  109. KeyCodeD
  110. Shift
  111. PatternBox_KeyPressJ
  112. PatternBox_LostFocus
  113. Pattern
  114. FindFileBtn_Click5
  115. Text1_Change~
  116. FindFileBox
  117.     ListCountx
  118. NotFound
  119. FindFileBox_Change
  120. FindFileBox_KeyPress
  121.     ListIndexd
  122. Label2_ClickX
  123.     BinSearchE
  124. Medianm
  125. Media9
  126. FileListBox
  127. FileFlb_PatternChange
  128. DirectoryLbl_Click
  129. DriveLbl_Click
  130. FileAttrFrm_DragDrop
  131. Source
  132. FilesLbl_Click
  133. FindFileLbl_Click
  134. PatternLbl_Clicki    
  135. SUB_KEYWORD
  136. FUNCTION_KEYWORD
  137. END_SUBB
  138. END_FUNCTION
  139. SortVBfileBtn_Click
  140. GetFilenamef
  141. GetFileExt
  142.     Filename_#
  143. MainFilename0
  144. ExtFilenameK    
  145. InputFileNumQ
  146. FreeF"
  147. ProcName
  148. Procy    
  149. GetExtFile
  150. IsSub/    
  151. LineNum
  152.     CountProc
  153. Rename
  154. FileNum
  155. FullFilename
  156. TheFilename
  157. MaxProc#    
  158.     CountPorc
  159. GetProcName
  160. GetSubName
  161. GetFunctionName
  162. OutputFileNum
  163. GetTempFilename
  164. GetTempFile
  165. SortProcedureData
  166. OutputFileI
  167. CountPoc8    
  168. Skipp
  169. SkipY    
  170. InOrderd    
  171. IntegerDim
  172. inetger
  173. TempProcName
  174. TempFileNum
  175. MousePointer
  176. Form1
  177. ViewFileBtn_Click:
  178. PrintFileCom_Click^
  179. Switch
  180. fileBtn_Click
  181. SortFileBtn_Click
  182.     LineIndex
  183. NumLines
  184. BinFileNum
  185. start
  186. ViewFileBtn_KeyUpp
  187. LineI
  188. LineJ
  189. LenBigTextLine
  190. LenBigLextLine
  191. LineLen
  192. LinePos
  193.     temporary
  194. buffer
  195. DiskDrv_Change
  196.  update file tree path when the disk is changedg
  197. Form_Load
  198. *.txt
  199. *.txt
  200. GetFileExt
  201. GetFilename
  202. PatternBox_KeyPress
  203. PatternBox_LostFocus
  204.  find first spacef
  205. PrintFileCom_Click
  206.  hourglass
  207. QuitBtn_Click
  208. SortFileBtn_Click
  209.  index of linesi
  210.  byte index for line
  211.  size of linef
  212.  number of text lines in filet
  213.  indices
  214.  indices
  215.  used in sorting
  216.  in-order flag
  217.  lines of text
  218.  full filename
  219.  main filename
  220.  extension name
  221.  declare variables for file I/O channels
  222.  hourglass
  223.  delete previous ".BAK" file
  224.  turn off error-handler
  225.  rename file as .BAK
  226.  first pass simply counts the number of linesb
  227.  file is empty
  228.  rename file back to originalA
  229. The text file is empty!
  230. Information
  231.  redimension the arrays-
  232.  LineIndex(0) is used in swapping the other elements of LineIndexx
  233. start pass 2
  234.  position of first byte-
  235.  read text linet
  236.  set index of line
  237.  store length of line
  238.  calculate the byte position of the next line 
  239.  the 2 represent the Chr$(13)+Chr$(10) charactersc
  240.  that delimit the text lines
  241.  close file buffersi
  242.  sort the text lines
  243.  start the Comb-sort algorithm
  244.  get indirect indices 
  245.  get line IC
  246.  get line JC
  247.  swap LineIndex elements
  248.  the element LineIndex(0) is used as a
  249.  temporary swap buffer
  250.  now copy lines from .BAK file into the text filei
  251.  open as binary
  252.  get the I'th line
  253.  size string LineI to read the I'th text linet
  254.  use Get and Put to copy lines
  255.  close all buffers
  256. TextBox_KeyPress
  257. TreeDir_Change
  258. ViewFileBtn_Click
  259.