bentleyeric
asked on
FileOpen Class not defined
I am new to VB.NET and am studying listbox related code. When attempting to implement some samples I get FileOpen not defined. Here is a code 'snippet'
Private Sub lstSelectedParents_Selecte dIndexChan ged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstSelectedParents.Selecte dIndexChan ged
Try
Dim aIndices(lstParent.Selecte dIndices.C ount - 1) As Integer
lstParent.SelectedIndices. CopyTo(aIn dices, 0)
lstSelectedParents.DataSou rce = aIndices ' Adds users selections to another listbox
With lstSelectedParents
.Items.Clear()
.BeginUpdate()
Dim fi As FileInfo '*** Here is the problem
For Each fi In lstSelectedParents.Selecte dItems
.Items.Add(fi.Name)
Next
.EndUpdate()
End With
Catch ex As Exception
lstSelectedParents.DataSou rce = Nothing
End Try
Private Sub lstSelectedParents_Selecte
Try
Dim aIndices(lstParent.Selecte
lstParent.SelectedIndices.
lstSelectedParents.DataSou
With lstSelectedParents
.Items.Clear()
.BeginUpdate()
Dim fi As FileInfo '*** Here is the problem
For Each fi In lstSelectedParents.Selecte
.Items.Add(fi.Name)
Next
.EndUpdate()
End With
Catch ex As Exception
lstSelectedParents.DataSou
End Try
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.