home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / lb_msgs / lb_msgs.frm (.txt) < prev    next >
Visual Basic Form  |  1992-09-01  |  7KB  |  160 lines

  1. LB_Msgs
  2. ListBox Messages
  3. Form1
  4. theList
  5. TopIndex
  6. GetTopIndex
  7. /SendMessage(GetFocus(), LB_GETTOPINDEX, 0%, 0&)
  8. GetTextLen
  9. GetTextLen
  10. <SendMessage(GetFocus(), LB_GETTEXTLEN, ByVal listEntry%, 0&)
  11. SetTopIndex
  12. SetTopIndex
  13. 9SendMessage(GetFocus(), LB_SETTOPINDEX, ByVal Index%, 0&)
  14. ResetContent
  15. ResetContent
  16. 0SendMessage(GetFocus(), LB_RESETCONTENT, 0%, 0&)
  17. FindString
  18. FindString
  19. HSendMessage(GetFocus(), LB_FINDSTRING, ByVal startAt%, ByVal theString$)
  20.     GetCurSel
  21.     GetCurSel
  22. -SendMessage(GetFocus(), LB_GETCURSEL, 0%, 0&)
  23. FillErUp
  24. Fill List Box
  25. :SendMessage(GetFocus(), LB_ADDSTRING, 0, ByVal theString$)
  26.     SetCurSel
  27.     SetCurSel
  28. ;SendMessage(GetFocus(), LB_SETCURSEL, ByVal listEntry%, 0&)
  29. SelectString
  30. SelectString
  31. MSendMessage(GetFocus(), LB_SELECTSTRING, ByVal startingAt%, ByVal theString$)
  32. QuitThis
  33. Seen it all
  34. GetDir
  35. Get DIR
  36. <SendMessage(GetFocus(), LB_DIR, ByVal DOS_attr&, filespecs$)
  37. More...
  38. Command1_Click
  39. lstFindEntry
  40. resultA
  41. SendMessage
  42. GetFocusL
  43. LB_GETTOPINDEX
  44. frmListBox
  45. CurrentX
  46. TopIndex[
  47. CurrentY
  48. Height
  49. theList
  50. Form_Click
  51. TopIndex_Click*
  52. theList_Click
  53. @    Form_Load
  54. LB_msgs
  55. FindString_Click
  56. LB_FINDSTRING
  57. FindString
  58. GetCurSel_Click^
  59.     GetCurSel
  60. LB_GETCURSEL
  61. SelectString_Clickm
  62. LB_SELECTSTRINGO
  63. SelectString7
  64. SetCurSel_Click
  65. LB_SETCURSEL
  66.     SetCurSel
  67. SetTopIndex_ClickJ
  68. LB_SETTOPINDEX
  69. SetTopIndex
  70. GetTextLen_Click
  71. LB_GETTEXTLEN
  72. GetTextLen3
  73. QuitThis_Click
  74. ResetContent_Click6
  75. LB_RESETCONTENTj
  76. ResetContent"
  77. FillErUp_Clicko
  78. LB_ADDSTRING
  79. Form_Paint
  80. loading.
  81. startingAt
  82.     ListCount
  83. showResult
  84. GetDir_Click
  85. LB_DIRA
  86. seeWhat
  87. GetDir
  88. DOSattr
  89. DOS_attr
  90.     filespecs
  91. LB_function
  92. Label1
  93. Caption
  94. LB_functions
  95. Form_Unload
  96. Cancel_
  97. Unload
  98. More_Click
  99. Visible
  100. False
  101. Width
  102. QuitThis
  103. FillErUp$
  104. TopIndex_Click
  105.  returns the index of the top (= first visible) item
  106. FindString_Click
  107.  finds a string (MS call it "prefix") but doesn't select ita
  108.  (see LB_SELECTSTRING for find-and-select)
  109.  the search string must be terminated by Chr$(0)
  110.  "startingAt" selects the entry at which the search starts
  111.  (wraps around if necessary). "-1" starts at the top..
  112. GetCurSel_Click
  113.  returns the index number of the currently selectedd
  114.  list box entry or LB_ERR if none selected
  115. SelectString_Click
  116.  finds a search string and selects the list box entry (unlike LB_FINDSTRING)..
  117.  the search string must be terminated by Chr$(0). "startingAt"
  118.  sets the entry where searching should start (wraps around iff
  119.  necessary). "-1" starts at the top.
  120. SetCurSel_Click
  121.  sets current selectionn
  122. random nth entry
  123. SetTopIndex_Click
  124.  sets current top (= visible) entry in list boxx
  125. random nth entry
  126. GetTextLen_Click
  127.  gets the length in characters of an entry in the list box
  128.  (here: length of currently selected entry found byy
  129.  LB_GETCURSEL).o
  130. QuitThis_Click
  131. self-documenting, don't you think?
  132. ResetContent_Click
  133.  clear list box contents. Much faster than VBB
  134. FillErUp_Click
  135.  fill the list box with some predictable garbage
  136.  text strings must be terminated by Chr$(0)r
  137. we'll display results on the formi
  138.  result& at this point contains the index number ofi
  139.  the just added item (in contrast to theList.AddItem)d
  140. give other tasks some breathing space too, and see
  141. the list box fill up (if your PC is slow enough...),
  142. showResult
  143. GetDir_Click
  144. c:\*.*
  145. filespec string; anything valid in a DIR command
  146. DOS attributes as follows (combine as needed using OR):R
  147. 0 = read/write files, no add'l attributes
  148. &H0001 = read-only files
  149. &H0002 = hidden filesl
  150. &H0004 = system filesl
  151. &H0010 = subdirectories
  152. &H0020 = archivest
  153. &H4000 = drives
  154. &H8000 = exclusive bit. If set, only files of theI
  155.      specified type are listed.t
  156. result& = number of items minus onea
  157. Form_Load
  158. Form_Unload
  159. More_Click
  160.