'Removes a selected item from the list box
Private Sub cmdDelete_Click()
'Check to see if an item in the list box has been selected to remove
If (lstPositions.SelCount = 1) Then
'Remove the entry from the list box
lstPositions.RemoveItem (lstPositions.ListIndex)
'Refresh the image current in the picture box
picSample.Picture = LoadPicture(cdbFile.FileName)
'Replace all the remaining X marks from the list box by parsing
'the list box entries and then printing an X at that location
For i = 0 To lstPositions.ListCount - 1
strMid1 = Mid(lstPositions.List(i), 2, (Len(lstPositions.List(i))) - 2)
strSplit1 = Split(strMid1, ",")
picSample.CurrentX = strSplit1(0)
picSample.CurrentY = strSplit1(1)
picSample.Print "X"
Next i
End If
End Sub