Advertisement
Java_Volume1 Internet/ HTML #97674

Embed Webpages into your program (1 Line of code to implement!) ((IE Only))

It allows you to embed HTML documents into your software and create HTML documents on the fly, without needing a connection to the internet.. I think it's limited to IE. Also - I have not hit the upper limit of the about:HTML method. HOWEVER, you must URL ENCODE the CRLFs and Spaces. One last thing... You can not edit a page once you put it up using this method, but you could use a BeforeNavigate Sub to capture the URL the person clicked on and set variables that way..

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
<center><h2>Embedding HTML into VB</h2><br>
...and ANY URL without SCRIPT!<p></center>
<small><A HREF="mailto:webmaster@hlrcomputers.com>by Herb Riede</A></small><p>
You need either a WebBrowser control to use the Navigate/Navigate2 URL method, or use a shell execute method similar to the one at:<br> <A HREF="http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=1320">PSC Code 1320</A><br>
Just replace the URL with the "about:HTML Code" or a string holding it like so:<p>
HTMLString = "about:<A HREF=http://www.planet-source-code.com>Planet Source Code</A>"<br>
Form1.WebBrowser1.Navigate HTMLString<p>
-or-<p>
Run a ShellExecute like the one at the code linked to above like this:<p>
HTMLString = "about:<A HREF=http://www.planet-source-code.com>Planet Source Code</A>"<br>
WebURL (HTMLString)<p>
The first one launches the page in your WebBrowser control in your app, the second launches the default browser (though this only
works in IE I think) with the code.<p>
<H3>Just For Your Enjoyment:</H3><br>
There are hidden 'easter-egg' about codes in IE including:<br>
<A HREF="about:mozilla">about:mozilla</A><p>
Oops.. the next one messed up PSC's page at first:<br>
about:<!-- introducing the Trident team -->
Original Comments (3)
Recovered from Wayback Machine