|
-
Jun 29th, 2000, 10:52 AM
#1
Thread Starter
Hyperactive Member
Ok, last ones for a while. I hope.
Two questions:
- How do I open an HTML file with the webbroswer control, one that is located at a specific place on the HDD?
- How do I Shell an HTML file?
Anyone know?
-
Jun 29th, 2000, 11:06 AM
#2
Question 1: I'm just full of questions, aren't I?
A: Questions are very good to be asked. If you get an answer, it's great. Because you learn more.
Question 2: How do I open an HTML file with the webbroswer control, one that is located at a specific place on the HDD?
A:
Needed: CommonDialog
Code:
On Error GoTo fileOpenErr
CommonDialog1.CancelError = True
CommonDialog1.flags = &H4& Or &H100&
CommonDialog1.DefaultExt = ".htm"
CommonDialog1.DialogTitle = "Select File To Open"
CommonDialog1.Filter = "HTM (*.htm)|*.htm"
CommonDialog1.ShowOpen
webbrowser1.Navigate CommonDialog1.FileName
fileOpenErr:
Exit Sub
Question 3: How do I Shell an HTML file?
A:
Code:
Private 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
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
ShellExecute Me.hwnd, vbNullString, "c:\htmlfile.htm", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
-
Jun 29th, 2000, 01:32 PM
#3
Thread Starter
Hyperactive Member
Revision of Question #1 (or 2, from Matthew's POV)
I need to know how to tell the Webbrowser control how to open it. I'm not familiar with how to write the URL. I think it has to have something like "file:" in it. I already know where the HTML files are located.
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
|