Guest robid1 Posted August 21, 2002 Posted August 21, 2002 OK, im real new to visual basic so be kind. I would like some advice on how to make a button be able to 'fetch' a txt file on the web, and display that in a rich text box, as you can see, nothing too hard for someone with experience. Im using VB .NET, just for personal use id really apreciate anyone that wants to help. Cheers. Quote
*Experts* Bucky Posted August 21, 2002 *Experts* Posted August 21, 2002 You are going to want to use the DownloadFile method of the WebClient class. Look in the .NET Framework references for examples of how to use it, and a listing of its memebers. You will have to download it to a text file, open the text file for reading, and read it into the RTB. Here is a little clip from the help file about the class: The WebClient class also provides three methods for downloading data from a resource: DownloadData downloads data from a resource and returns a byte array. DownloadFile downloads data from a resource to a local file. OpenRead returns the data from the resource as a Stream. Good luck. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Gurus* divil Posted August 21, 2002 *Gurus* Posted August 21, 2002 Surely DownloadData would be more appropriate, as it doesn't require writing to a file first? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.