Functions in LBAPI.ocx. --------------------------------------------------------- ListDrives (List Drives) Adds all the drive letters on the system to the list specified in alphabetical order. E.g. LBAPI.ListDrives List1 --------------------------------------------------------- ListEdit (List Edit) Visual Basic does not have this list method, instead you have to do this to edit a list item: List1.RemoveItem 5 List1.AddItem "String", 5 LBAPI allows you to do this with one line. E.g. LBAPI.ListEdit List1, "String", 3 'List1 is the ListBox, '"String" is the replace text and 3 is the list index. --------------------------------------------------------- ListFiles/ListFolders (List Files/List Folders) Adds all the files or folders within the folder specified to the list specified. The full path is used. E.g. LBAPI.ListFiles List1, "c:\windows\desktop" LBAPI.ListFolders List1, "c:\windows" --------------------------------------------------------- ListFind (List Find) Locates a entry in a list using the string specified. Only part of the string is necessary. The return value is an integer value the index of where the string is in the list. If the text is not found, -1 is returned. E.g. MsgBox LBAPI.ListFind(List1, "Fastl") 'returns the index 'of the text "Fastlove" in List1. --------------------------------------------------------- ListFindExact (List Find Exact) Locates a entry in a list using the string specified. All of the string is necessary. The return value is an integer value the index of where the string is in the list. If the text is not found, -1 is returned. E.g. MsgBox LBAPI.ListFindExact(List1, "Fastlove") 'returns 2 MsgBox LBAPI.ListFindExact(List1, "Fastl") 'returns -1 --------------------------------------------------------- ListGetSelCount (List Get Selection Count) Returns the number of items selected in a ListBox. E.g. MsgBox LBAPI.ListGetSelCount(List1) --------------------------------------------------------- ListGetTextLen (List Get Text Length) Returns the length of the selected item in the list specified. It is similar to Visual Basic's Len() function. E.g. MsgBox LBAPI.ListGetTextLen(List1) --------------------------------------------------------- ListHoriScroll (List Horizontal Scroll) Adds a horizontal scroll bar to ListBoxes. The Width argument is in pixels. E.g. LBAPI.ListHoriScroll List1, 300 'the ListBoxes Width 'property maybe 100 pixels, but now it seems like 300 'with the horizontal scrollbar added. --------------------------------------------------------- Listload/Listsave (List load/List save) Loads all the lines from an external file into a ListBox or saves all the lines from a ListBox to a file. If you use the Listsave function with an empty ListBox, an error will occur. E.g. LBAPI.Listload List1, "c:\windows\tips.txt" 'the contents 'of "c:\windows\tips.txt" is now in List1. LBAPI.Listsave List1, "c:\windows\desktop\test.txt" 'the 'contents of List1 is now in the file '"c:\windows\desktop\test.txt". --------------------------------------------------------- Martin Allen 1999 http://www.martin2k.co.uk