|
-
Jul 11th, 2003, 02:09 PM
#1
Thread Starter
New Member
Displaying web pages in vb.net forms
Hi All,
Does anyone know if it is possible to display html web pages in vb.net forms.
I have had a look around and can not find any way to do it. I do not need anything fancy just the ability to display a plain html file with a table in.
Any ideas??
Thanks,
Adam
-
Jul 11th, 2003, 04:00 PM
#2
PowerPoster
You can display web pages in the default browser by using the LinkLabel Control:
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
LinkLabel1.Text = "Click here to get more info."
LinkLabel1.Links.Add(6, 4, "www.microsoft.com")
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal _
e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles _
LinkLabel1.LinkClicked
System.Diagnostics.Process.Start(e.Link.LinkData.ToString())
End Sub
Is that what you were looking for?
-
Jul 11th, 2003, 04:32 PM
#3
Thread Starter
New Member
I was wanting to be able to imbed them in the actual form, without having to launch an external browser.
Like you could in vb6 with the webbrowser control, which seems to be non existant in vb.net.
Any further ideas?
Adam
-
Jul 11th, 2003, 04:43 PM
#4
Lively Member
Why don't you use the webbrowser from microsoft :
c:\windows\system32\shdocvw.dll
You just have to reference it :
in your toolbar, right click, add/remove components, COM component, and you'll find it.
I know this is using COM, maybe you're looking for straight .NET code.
-
Jul 11th, 2003, 04:50 PM
#5
Sleep mode
Originally posted by matt3011
I know this is using COM, maybe you're looking for straight .NET code.
Unfortunately , there is not .NET way yet .
-
Jul 11th, 2003, 05:43 PM
#6
Thread Starter
New Member
Hi,
If I use the SHDOCVW.DLL will there be any problems in using the app on other versions of windows.
Mainly 2k and XP and possible NT and 2003.
Can I package the DLL with the app?
Thanks,
Adam
-
Jul 11th, 2003, 05:55 PM
#7
Lively Member
I don't think that's useful to package it with your app because it is installed by Internet Explorer and so, it is present on every computer running Microsoft OSs.
-
Jul 11th, 2003, 06:12 PM
#8
Thread Starter
New Member
Well it will make life easier for me, as I can just assume that it will be there then, because as you say, any ms os comes with IE in some form.
Thanks for your help, I will look into using.
Do you know if it is possible to pass a string or a stream of html as the web page instead or a file, from some thing like a streamwriter?
Thanks,
Adam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|