Solved

Read text File from a website into a vb.net win form

Posted on 2013-01-15
3
611 Views
Last Modified: 2013-01-15
I am trying to read a text file into a scrolling label control in a vb.net win form.
The problem is i'm getting   URI not Supported
Code is
Dim fsStream As New FileStream("http://powerzsoftware.com/Nba/Grizzlies.txt", FileMode.Open, FileAccess.Read)
            Dim srReader As New StreamReader(fsStream)

            Try
                srReader.BaseStream.Seek(0, SeekOrigin.Begin)
                While srReader.Peek() > -1
                    Label6.Text = (srReader.ReadLine())
                End While
                srReader.Close()
            Catch ex As IOException
                Label6.Text = (ex.Message)
            End Try
0
Comment
Question by:powerztom
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 38779391
Use the my.computer.network.downloadfile method to first download the file and then open it

http://msdn.microsoft.com/en-us/library/ack30t8y(v=vs.90).aspx
0
 

Author Closing Comment

by:powerztom
ID: 38779999
Clever Idea Thank You.

powerzsoftware.net
Powerzsoftware.com
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38780009
Can you explain that grade?
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

16 Experts available now in Live!

Get 1:1 Help Now