|
-
Jan 14th, 2003, 02:18 PM
#1
Thread Starter
New Member
open web page in brwoser from vb
Hi,
I'm trying to open a HTMl document in the default web browser just by clicking a button in my vb program. Does anyone have any tips or placews where i can go to look at sample code?
Thanks
-
Jan 14th, 2003, 02:46 PM
#2
Fanatic Member
Re: open web page in brwoser from vb
Originally posted by ericdg
Hi,
I'm trying to open a HTMl document in the default web browser just by clicking a button in my vb program. Does anyone have any tips or placews where i can go to look at sample code?
Thanks
Wait a sec, searching... I had this in the simplest program provided by VBWORLD!
... Search in progress...
Oh and damn, cant find it... I'll post it back later, Im at school and dont have all my programs here... And I cant seem to remember the function by heart!
You could however, add a control to browse...
And use the
VB Code:
WebBrowser.Navigate PathAndFilenameOfHtmlDocument
-
Jan 14th, 2003, 02:50 PM
#3
Addicted Member
This has been addressed about 2 or 3 times
Try searching for WebBrowser:
For all of you in need it's your friend in deed! Here is the code to display Web Pages offline in a Web Browser control:
'WebBrowser must first navigate to a HTML file.
WebBrowser1.Document.Open
WebBrowser1.Document.Write rtfEdit.Text
WebBrowser1.Document.Close
Stay tuned to find out how to display ASP pages offline!
HOLLA!!!!!!!
NOTE: This should work with any type of text box. Sorry about the other two post I didn't know if they went through becuase they didn't show up.
212 will lead you to the truth
-
Jan 14th, 2003, 02:55 PM
#4
Frenzied Member
VB Code:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute Me.hWnd, "Open", "http://www.msn.com",0,0,3
End Sub
-
Jan 14th, 2003, 02:58 PM
#5
Fanatic Member
AH HA!
Originally posted by andreys
VB Code:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute Me.hWnd, "Open", "http://www.msn.com", 0, 0, 3
End Sub
This was exacly what I wuz searching for, ! Its in almost every program of VBWORLD, ... to visit the authors webpage... But with the new construction of vbworld, I couldn't find the new download section!
Well, hope it helps!
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
|