Accessing an HTML page from within program

sven4077

New member
Joined
Sep 11, 2004
Messages
3
Programming Experience
Beginner
How would one access an html page from within a vb.net program? So far I have the forms that I want set up and I have created an html page within VB.net, however I do not know how to access that page from the program. Like when the user clicks on a button the page opens from the source within the program. Thanks.
 
Html

ok first off, where is this HTML file? is it compiled as a resource in to the DLL/EXE or is it in a seporate file? or is it online?

Next do you want it to show as source? or as a render'd page?
 
The html page was an add in. Like when you add a new form. I dont know the correct term right now. What I want is for the page to be part of the program, so it goes wherever the program is with it, and when someone clicks a button, that page opens in IE.
 
If you want it to be a control in your window, to show it like you would an image or a button on the form use the Web Browser com control. If you want to click a button and have an IE box popup, there are several ways you can do this, you can go the managed route:
System.Diagnostics.Process.Start("http://www.vbdotnetforums.com")

that will start the default browser at the link given. If you want to start in ONLY IE try

With New System.Diagnostics.Process
.StartInfo.FileName = "iexplore"
.StartInfo.Arguments = http://www.vbdotnetforums.com
.Start()
End With

If its a local file, say an html file in your programs root dir... switch th url out with that.

IF the HTML file is EMBEDDED within the DLL. you can use any of thos methods but. to access the file withing the dll use the res:// protocol. For example when you stop a page from loading in ie youd actually be pulling the "Navigation Cancled" page from a dll. Like so.
res://C:\WINDOWS\System32\shdoclc.dll/navcancl.htm

Theres also a list of unmanaged Windows API to do simular.

Hope i answered all possibilites of the meaning to your question... its kinda confusing since theres so many ways of doing this stuff.
 
Back
Top