?
Solved

Opening Help

Posted on 1999-01-10
6
Medium Priority
?
190 Views
Last Modified: 2010-05-03
I have made my own help file to go along with a program I am working on. How do I open the help file, "The Command" such as when I hit the "F1" key and it opens. Or you go to help on a menue bar and scroll to "Help Contents", know what I mean?
Thanks
0
Comment
Question by:Bigway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 2

Expert Comment

by:VBDesigns
ID: 1455198
Here's an example that opens the helplesson to a specific context location.  You can also cause it to start up at the contents, or cause a context to pop up in as 'pop-up' window.

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

Public Const HELP_CONTENTS = &H3        ' Display Help for a particular topic
Public Const HELP_CONTEXT = &H1         ' Display topic in ulTopic
Public Const HELP_CONTEXTPOPUP = &H8    ' Display Help topic in popup window

Const HELP_CONTEXT_BETA = 1000

iResult = WinHelp(frmMain.hWnd, App.HelpFile, HELP_CONTEXT, HELP_CONTEXT_BETA)
0
 

Author Comment

by:Bigway
ID: 1455199
VBDesigns
 I could just be a dummy but I am still having problems. I pasted the code you gave me into a module. When I try to run the program it says that "frmMain.hWnd" is an invalid call to an outside procedure. I want to allow for my user to open to my help index via a drop down menu option. Do I make some sort of call with a command to the code you gave me?
0
 

Author Comment

by:Bigway
ID: 1455200
VBDesigns
 I could just be a dummy but I am still having problems. I pasted the code you gave me into a module. When I try to run the program it says that "frmMain.hWnd" is an invalid call to an outside procedure. I want to allow for my user to open to my help index via a drop down menu option. Do I make some sort of call with a command to the code you gave me?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Bigway
ID: 1455201
Sorry VbDesigns. I waited for you to get back. The answer doesnt seem to work, although I suspect it is the correct answer and I am leaving something out.Or I missed something.
0
 

Accepted Solution

by:
tyroneb earned 200 total points
ID: 1455202
I may be oversimplifying your problem, but if you're simply interested in calling the help screens from a menu option, you could use the following command:

SendKeys "{F1}", True

I'm going to experiment some with VBDesigns answer, because I've been looking for a way to open the contents file before anything else.
0
 

Author Comment

by:Bigway
ID: 1455203
tyroneb,
 You were not oversimplifying it. I had tried that command before but messed it up. Ive never sent keys. I used "SendKeys {F1}", and it did not work. Yours did : )
 I had to have this in the form load "App.HelpFile = "c:\JumpLog\Jumplog.hlp"" of course.
 I think VBDesigns answer would work but I dont know enough to mess with it. If you get it to work could you e-mail me and let me know, please. Also do you know a way to load my help file without hard codeing it? I guess through the regestry but Im not sure, never did that.
Thanks
 bigway@digitaldune.net
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question