Jump to content
Xtreme .Net Talk

URL's and RTB


Recommended Posts

Guest robid1
Posted

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.

  • *Experts*
Posted

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.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...