|
-
Jul 2nd, 2002, 02:50 PM
#1
Thread Starter
Fanatic Member
Need help with SendMessage & Array
VB Code:
For i = 1 To ListView1.ListItems.Count
x = SendMessage(File1.hwnd, LB_FINDSTRING, -1, ByVal ListView1.ListItems.Item)
If x = -1 Then 'item is NOT found in filelistbox
strRemoved = ListView1.SelectedItem.Text
Well, here's what I've got to start with, and here's what I'm trying to do:
Compare each listitem in my listview to each item in my filelistbox. Then if the item in the listview is NOT found in the filelistbox, I want to log it to an array or something. After this is done, I will build an array from my existing textfile, search the new array for any lines containing the items I logged to my "removed" array, and remove the lines from the array. Then I will build a new textfile with the updated array. Any help with this is appreciated. I can do the array searching, but I'm trying to figure out how to make an array that contains all of the items that weren't found.
-
Jul 2nd, 2002, 03:03 PM
#2
Frenzied Member
VB Code:
'GENERAL_DECLARATIONS
Dim arry As Variant
'CODE
Dim numitm As Long
'your other declarations here.
'Any code before searching here
For i = 1 To ListView1.ListItems.Count
x = SendMessage(File1.hWnd, LB_FINDSTRING, -1, ByVal ListView1.ListItems.Item)
If x = -1 Then 'item is NOT found in filelistbox
strremoved = ListView1.SelectedItem.Text
numitm = numitm + 1
ReDim Preserve arry(numitm) As String
arry(numitm) = strremoved
'anything else you need to do here
Next
'Any other code here
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|