?
Solved

FileOpen Class not defined

Posted on 2004-09-15
2
Medium Priority
?
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Assisted Solution

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

Imports System.IO.FileInfo
0
 
LVL 27

Accepted Solution

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

Imports System.IO
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

801 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