Error: file not found
Error: file not found
Error: file not found
Error: file not found
Error: file not found
Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found
Error: file not found Error: file not found
Error: file not found
Go Back  Xtreme Visual Basic Talk > > > Error: file not found


Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2004, 01:44 AM
SuperChris9 SuperChris9 is offline
Newcomer
 
Join Date: Feb 2004
Posts: 2
Exclamation Error: file not found


Here is my error:

quote:
--------------------------------------------------------------------------------
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not find file "D:\test.txt".
--------------------------------------------------------------------------------



Here is my code:
visual basic code:--------------------------------------------------------------------------------Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim FileReader As New IO.StreamReader("D:\test.txt")
Do Until FileReader Is Nothing
FileReader.ReadLine()
ListBox1.Items.Add(FileReader)
Loop
End Sub--------------------------------------------------------------------------------

Don't understand what the problem is!!!!!!!!!
The file is there, I know it is!!
Reply With Quote
  #2  
Old 02-08-2004, 02:05 AM
corp769 corp769 is offline
Newcomer
 
Join Date: Feb 2004
Posts: 14
Default

just a really dumb question, but if D is your cd drive, do you even have a CD in there at all? not to be rude or anything, but i have already seen it happen.....lol
Reply With Quote
  #3  
Old 02-08-2004, 02:13 AM
SuperChris9 SuperChris9 is offline
Newcomer
 
Join Date: Feb 2004
Posts: 2
Default

no dude, the D: drive is my second partition on my harddrive. I have 4 partitions C:, D: E: and F:
Reply With Quote
  #4  
Old 02-08-2004, 02:17 AM
corp769 corp769 is offline
Newcomer
 
Join Date: Feb 2004
Posts: 14
Default

o ok man got ya there.......i would love to help you out but it doesnt work on my system cause i cant install any more dll files without getting error messages cause my system is working off of hardly anything right, well, until i get my new area-51 alienware computer........
Reply With Quote
  #5  
Old 02-08-2004, 02:26 AM
corp769 corp769 is offline
Newcomer
 
Join Date: Feb 2004
Posts: 14
Default

wait a min........try this quick:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim FileReader As New System.IO.StreamReader("D:\test.txt")
Do Until FileReader Is Nothing
FileReader.ReadLine()
ListBox1.Items.Add(FileReader)
Loop
End Sub

(note how i added SYSTEM.io.streamreader....)
and make sure that test.txt is actually there and is more than one line, even if it has a carrige return, it should help it out.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Problem - PLs help urgenlty dpdsouza Installation / Documentation 4 12-02-2004 08:09 PM
display next found record fraser5002 Database and Reporting 1 11-30-2003 03:57 AM
Send 2 sms Stress General 6 05-07-2003 02:19 AM
Problem sending 2nd sms Stress Communications 0 05-04-2003 08:28 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Error: file not found
Error: file not found
Error: file not found Error: file not found
Error: file not found
Error: file not found
Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found Error: file not found
Error: file not found
Error: file not found
 
Error: file not found
Error: file not found
 
-->