Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-01-15
3
Medium Priority
?
636 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
[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
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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.
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

722 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