Vb6 browser get html source code

Asked By 70 points N/A Posted on -
qa-featured

Hi,

How to vb6 browser get html source code.

Please send me the full details about vb6 browser get html source code.

Thanks!

Regards

SHARE
Answered By 0 points N/A #135203

Vb6 browser get html source code

qa-featured

Hi Dear!

1. Create a new project by clicking ‘File’ and ‘New Project’. Name it "WebSourceReader."

2. Go to the ‘Toolbox’ link and double click on ‘Text Box’.

3. The text box will be added to the form. Then again double click on it to add a second text box to the form.

4. The first text box will be an address field and second will display the text from the web page.

5. Click the second text box. A black ‘options arrow’ will appear. Click it and select ‘Multiline’.

6. Drag the bottom of the text box to make it fill out the rest of the form. Look in the ‘Properties’ window and find the ‘Scrollbars’ property. Set it to ‘Vertical’.

7. Double-click the button to go to the source code editor and create an event for loading the web page text. Paste the following code:

8. dim webpage as uri = new uri(textbox1.text)

9. dim tempfile as string = my.computer.filesystem.gettempfilename()

10. my.computer.filesystem.deletefile(tempfile)

11. my.computer.network.downloadfile(webpage, tempfile)

12. textbox2.text = my.computer.filesystem.readalltext(tempfile)

13. my.computer.filesystem.deletefile(tempfile)

14. Going line by line, this transforms the text from the first text box into a valid URL. It then determines a suitable unique temporary file that can be used to store the web page text. Finally, the file is read into the second text box and deleted from the hard drive.

Related Questions