Get a Jumpstart with our Sample Apps
Results 1 to 4 of 4

Thread: Standard Windows Help File (.hlp file)

  1. #1
    Member
    Real Name
    David Priest
    Join Date
    Mar 2000
    Posts
    213

    Default Standard Windows Help File (.hlp file)

    Subject:- Standard Windows Help File (.hlp file)
    I am authoring my own My_Prog.hlp files. I have set the form properties Help Entry tab on each of my forms to "Standard Windows Help File" and I have Specified the Help file name. At startup, I load my Startup Menu form.
    My problem is the first time I press F1 on my "Startup Form", the Alpha5 V5 - Online Help screen appears instead of my own Help screen, if I then close the A5 help form and then press F1 again, my own help file appears. The problem does not occur if I use my buttons on my startup form to open other forms and then press the F1 Key or if I then return to my startup form. It only ever occurs if I press F1 immediately after startup.
    I expect that I could easily do some xbasic on the Onkey event for the startup form, but before I do, I would like to know if anyone else has encountered and solved the problem.
    Many thanks

    David

  2. #2
    Member
    Real Name
    Blake Watson
    Join Date
    Jan 2003
    Posts
    961

    Default RE: Standard Windows Help File (.hlp file)

    Probably not much help BUT I've seen this subject come up before, or one damn close to it. Did you scour the boards?

  3. #3
    Alpha Software Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,157

    Default RE: Standard Windows Help File (.hlp file)

    David

    This has always been a problem. The implementation available in form properties doesn't work much better that older methods using the OnKey event. I don't use the option in form proerties, but when I tested it, I got the same result. I tried both a .hlp file and a .chm file.

    There is a workaround, which is the method used before it was added to form properties. You can use the OnKey event to trap the F1 key. The manuals give a method, but I have found that select, case works better that if, then. Here are 2 slightly different codes that work.

    select
    case a_user.key.value = "{F1}" .and. a_user.key.event = "down"
    a_user.key.handled = .T.
    help_filename = :a5.get_path() + "\yourhelp.hlp"
    winhelp_show(help_filename)
    case a_user.key.value = "{F1}" .and. a_user.key.event = "up"
    a_user.key.handled = .T.
    end select

    Second Example;

    select
    case a_user.key.value = "{F1}"
    if a_user.key.event = "down"
    a_user.key.handled = .T.
    help_filename = :a5.get_path() + "\yourhelp.hlp"
    winhelp_show(help_filename)
    end if
    end select

    Normally, the second example works fine. But in some cases there seems to be a timing issue where the OnKey doesn't trap the key stroke fast enough and then you get the A5 help. This can happen in either example, so try them both.

    Now, if you want to ensure that the user always gets your help, rename the A5 help file and name your help file the same as the original A5 help. The A5 help file is "A-USER.chm" in the A5 program directory. If you create a chm help file, just name it the same and place it in the A5 program directory. Of course, now you will always get your help file anywhere in A5.

    Jerry

  4. #4
    Member
    Real Name
    David Priest
    Join Date
    Mar 2000
    Posts
    213

    Default RE: Standard Windows Help File (.hlp file)

    Many thanks Blake & Jerry
    I think I may get a .chm compiler

    David

Similar Threads

  1. No more file handles left - Windows Me
    By Mimi Sheiner in forum Alpha Four Version 6 and Prior
    Replies: 3
    Last Post: 02-12-2003, 06:48 PM
  2. Emulating Windows folder/file structure in A5
    By MS in forum Alpha Five Version 5
    Replies: 9
    Last Post: 01-31-2003, 03:39 PM
  3. windows file directory
    By Jeff, Richards in forum Alpha Five Versions 2 and 3
    Replies: 1
    Last Post: 09-11-2001, 07:53 AM
  4. File Handles In Windows ME
    By Ross McEllhiney in forum Alpha Four Version 6 and Prior
    Replies: 9
    Last Post: 02-19-2001, 05:15 AM
  5. File Handles In Windows ME
    By Ross McEllhiney in forum Alpha Four Version 6 and Prior
    Replies: 0
    Last Post: 01-02-2001, 07:52 AM

Posting Permissions

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