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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An easy one for the right person 1

Status
Not open for further replies.

Toastie

Programmer
May 19, 2001
123
AU
i have this code

Dim doco As Object
Private Sub Form_Load()
WebBrowser1.Navigate "d:\hi.html"
Set doco = WebBrowser1.Document
Text1.Text = doco
End Sub

and i want to display it as text
like the actual source of the object
it should look like this

<html>
<head>
<script language=&quot;javascript&quot;>
function al(){
alert(&quot;hi&quot;)
}
</script>
</head>
<body onload=&quot;al()&quot;>
<h1>HI YA</h1>
</body>
</html>
 
Hi,

You can use the Inet control to get the html code:
--------------------------------------
Inet1.URL = &quot;Text1.Text = Inet1.OpenURL
--------------------------------------
Remenber to set the .multiline property of the textbox to true.
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
so how do i change all the funny | looking characters for newlines [enter]

??????

any suggestions?
 
Hi,

Did you set the .multiline property of the textbox to true?
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
that is an affermative

yeah i did but it displays these funny little black lines where all the returns are supposed to be

i have even got a scrollbar
 
Hi agian,

If the page you are loading has UNIX linefeeds (ascii code 10) and not DOS (ascii code 13 & ascii code 10), a littel bar will show to represent the ascii code 10 (linefeed).
To fix that, try:

-----------------------------------------------------
Inet1.URL = &quot;Text1.Text = replace(Inet1.OpenURL,chr(10),vbcrlf)
-----------------------------------------------------
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
sorry to alarm you but a good compile to exe fixed it in a jiffy i just found out

i wonder why
a bug in vb6 possibly?? naah not micro$oft

thankyou very much anyhow you deserve a star !!!!!!!!!
 
hello there

change the font of textbox to a TTF (True Type Font) i.e Times new roman n get rid of those funny | characters.

enjoy

ComputerJin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top