Results 1 to 3 of 3

Thread: I'm just full of questions, aren't I?

  1. #1

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268

    Talking

    Ok, last ones for a while. I hope.

    Two questions:
    1. How do I open an HTML file with the webbroswer control, one that is located at a specific place on the HDD?
    2. How do I Shell an HTML file?


    Anyone know?
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  2. #2
    Guest
    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

  3. #3

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268

    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.
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width