Solved

FileOpen Class not defined

Posted on 2004-09-15
2
273 Views
Last Modified: 2006-11-17
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_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstSelectedParents.SelectedIndexChanged
        Try
            Dim aIndices(lstParent.SelectedIndices.Count - 1) As Integer
            lstParent.SelectedIndices.CopyTo(aIndices, 0)
            lstSelectedParents.DataSource = 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.SelectedItems
                    .Items.Add(fi.Name)
                Next
                .EndUpdate()
            End With
        Catch ex As Exception
            lstSelectedParents.DataSource = Nothing
        End Try
0
Comment
Question by:bentleyeric
2 Comments
 
LVL 7

Assisted Solution

by:natloz
natloz earned 250 total points
ID: 12068728
At the top of the form you need...

Imports System.IO.FileInfo
0
 
LVL 27

Accepted Solution

by:
planocz earned 250 total points
ID: 12068754
or Just do..

Imports System.IO
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now