Results 1 to 13 of 13

Thread: Opening Files[Resolved] - Still open for general help to anyone who needs it

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    Johannesburg
    Posts
    51

    Unhappy Opening Files[Resolved] - Still open for general help to anyone who needs it

    I have designed a web-page for use as a help file (making it interactive) however I have no idea how to open the file when pressing the Help command button.

    Can anybody please help???
    Last edited by MasterMind_2002; Nov 11th, 2002 at 01:44 PM.

  2. #2
    Frenzied Member KayJay's Avatar
    Join Date
    Jul 2001
    Location
    Chennai
    Posts
    1,849
    Use the following API Call
    VB Code:
    1. Private Declare Function ShellExecute Lib "shell32.dll" _
    2. Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As _
    3. String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    4. Const SW_SHOWNORMAL = 1
    5. Private Sub Form_Load()
    6. "open", app.path& "\He;pfile.html", vbNullString, app.path, SW_SHOWNORMAL
    7. End Sub

    More info http://www.Allapi.net

    "Brothers, you asked for it."
    ...Francisco Domingo Carlos Andres Sebastian D'Anconia

  3. #3
    Lively Member technitaes's Avatar
    Join Date
    Oct 2002
    Location
    Tennessee, USA
    Posts
    112
    There are a couple of ways to go about it. If you want to say away from API calls, you can simply create a browser form in your vb project with only the browser control on the form (no tool bar or address bar). Then when the user clicks the Help button, show that browser form and Navigate() to the HTML help file.

    Another option would be to use the ShellExecute API to call the help file directly and allow the API to load your HTML help file in the user's default Browser.

    The advantage of the first option is your ability to customize the browser to possibly add some customized features to the "help" browser that are specifically related to the help files or your application.

    Hope it Helps
    tecnithV -- artisan, artificer, workman, mechanic, architect, or builder
    VB6, ASP, HTML, XML, Oracle, Access, MySql, PHP, C++, Etc...
    To format your VB code in this forum use tags like this [vbcode]your code here[/vbcode]

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    A Better Solution.....

    Code designed specifically for Help files....
    VB Code:
    1. Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
    2. Public Const HELP_CONTEXT = &H1
    3. Public Const HELP_QUIT = &H2
    4. Public Const HELP_INDEX = &H3
    5. Public Const HELP_CONTENTS = &H3
    6. Public Const HELP_HELPONHELP = &H4
    7. Public Const HELP_SETINDEX = &H5
    8. Public Const HELP_SETCONTENTS = &H5
    9. Public Const HELP_CONTEXTPOPUP = &H8
    10. Public Const HELP_FORCEFILE = &H9
    11. Public Const HELP_KEY = &H101
    12. Public Const HELP_COMMAND = &H102
    13. Public Const HELP_PARTIALKEY = &H105
    14. Public Const HELP_FINDER = &HB&
    15.  
    16. Public Const HELP_FILE_NAME = "MyHelpFile.chm"
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    Addicted Member
    Join Date
    Aug 2002
    Location
    Coventry, England
    Posts
    169

    Re: A Better Solution.....

    Originally posted by techgnome
    Code designed specifically for Help files....
    VB Code:
    1. Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
    2. Public Const HELP_CONTEXT = &H1
    3. Public Const HELP_QUIT = &H2
    4. Public Const HELP_INDEX = &H3
    5. Public Const HELP_CONTENTS = &H3
    6. Public Const HELP_HELPONHELP = &H4
    7. Public Const HELP_SETINDEX = &H5
    8. Public Const HELP_SETCONTENTS = &H5
    9. Public Const HELP_CONTEXTPOPUP = &H8
    10. Public Const HELP_FORCEFILE = &H9
    11. Public Const HELP_KEY = &H101
    12. Public Const HELP_COMMAND = &H102
    13. Public Const HELP_PARTIALKEY = &H105
    14. Public Const HELP_FINDER = &HB&
    15.  
    16. Public Const HELP_FILE_NAME = "MyHelpFile.chm"


    This solution opens html files also? Because I'm assuming MasterMind_2002 is using html as he said "web-page".

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Actually, no it doesn't. But.... if he's got HTML file(s), might as well compile it into a CHM file, then the user would have full searching and index capabilities. It doesn't take much and looks more professional besides.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    Johannesburg
    Posts
    51
    Ok, I am thinking that API is the better solution, it's much less code aswell.

  8. #8
    Addicted Member
    Join Date
    Aug 2002
    Location
    Coventry, England
    Posts
    169
    Originally posted by techgnome
    Actually, no it doesn't. But.... if he's got HTML file(s), might as well compile it into a CHM file, then the user would have full searching and index capabilities. It doesn't take much and looks more professional besides.
    Oh, I understand now. I've never compiled a chm file. Although I might give it a try now Any shareware/freeware apps to do it?

  9. #9

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    Johannesburg
    Posts
    51
    And how exactly do I design this CHM file (I have never even heard of it before)

  10. #10
    Addicted Member
    Join Date
    Aug 2002
    Location
    Coventry, England
    Posts
    169
    Originally posted by MasterMind_2002
    And how exactly do I design this CHM file (I have never even heard of it before)
    I just found a program on my PC called HTML workshop, which compiles chm files. Do a search for *.chm on your PC, you will be suprised how many there are

  11. #11
    Frenzied Member KayJay's Avatar
    Join Date
    Jul 2001
    Location
    Chennai
    Posts
    1,849
    Originally posted by techgnome
    Actually, no it doesn't. But.... if he's got HTML file(s), might as well compile it into a CHM file, then the user would have full searching and index capabilities. It doesn't take much and looks more professional besides.
    Absolutely true. I had plain Word Documents earlier. real dud of a documentaion.

    U can download the Microsoft HTML HELP Workshop from their site. Its free and it quite easy to use.

    "Brothers, you asked for it."
    ...Francisco Domingo Carlos Andres Sebastian D'Anconia

  12. #12

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    Johannesburg
    Posts
    51
    How did you learn to use it though? or is it that easy

  13. #13
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by seh
    Oh, I understand now. I've never compiled a chm file. Although I might give it a try now Any shareware/freeware apps to do it?
    Yes, goto http://msdn.microsoft.com and search for HTML HelpKit... you can also search the web. There are several out there.

    Originally posted by MasterMind_2002
    And how exactly do I design this CHM file (I have never even heard of it before)
    It takes a bit of work and some playing around with it, but it works basically like this (it's been a while, and we use RoboHelp, so this is just the basics):
    Create html pages for each page you want in your help file.
    In the HelpKit, create a new project, add the files. You can then add "Chapters" and other groupings, and move the files around, putting them into related groups.
    If you want context sensitive help, there some additional things that need to be done.

    Let me know if you want/need more info.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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