Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with inet control

Status
Not open for further replies.

cyberwolf14

Programmer
Aug 27, 2001
65
BE
Hello,

I have a problem with the code bellow:

Code:
Private Sub Command1_Click()
Text1.Text = Inet1.OpenURL("[URL unfurl="true"]http://www.hotmail.com/")[/URL]
End Sub

With "
Code:
[URL unfurl="true"]http://www.hotmail.com/[/URL]
" there is no problem at all. It gives the source of the website in a text box.
But if i change "
Code:
[URL unfurl="true"]http://www.hotmail.com/[/URL]
" by for example "
Code:
[URL unfurl="true"]http://www.angelfire.com/[/URL]
" it gives only a part of the code and every new line is replaced by "|"

What do I do wrong??
 
I suspect that the second site is sending chr(10) [linefeed] only at the end of each line. A VB text box shows this as a vertical bar.
TextBox needs chr(13) and chr(10) to do a newline.
You can load the string into a variable then do a replace:
Code:
Private Sub Command1_Click()
Dim myStr
myStr = Inet1.OpenURL("[URL unfurl="true"]http://www.angelfire.com/")[/URL]
myStr = Replace(myStr, vbLf, vbCrLf)
Text1.Text = myStr
End Sub
Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 

johnwm is probably right. UNIX uses linefeed as line separator in text files whereas DOS/Windows uses carriage return AND LineFeed as line separator. E.i. when downloadning files from UNIX servers you have to convert the line separator, like johnwn have shown above.
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
You are right but if I convert it I can still see only a part of the HTML code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top