Search Tools Links Login

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


Visual Basic 6, or VB Classic

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..

Original Author: Rabid Nerd Productions

Code

Embedding HTML into VB



...and ANY URL without SCRIPT!


PSC Code 1320

Just replace the URL with the "about:HTML Code" or a string holding it like so:


HTMLString = "about:Planet Source Code"

Form1.WebBrowser1.Navigate HTMLString


-or-


Run a ShellExecute like the one at the code linked to above like this:


HTMLString = "about:Planet Source Code"

WebURL (HTMLString)


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.


Just For Your Enjoyment:



There are hidden 'easter-egg' about codes in IE including:

about:mozilla


Oops.. the next one messed up PSC's page at first:

about:

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 95 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.