Solved

Opening Help

Posted on 1999-01-10
6
179 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
Technology Partners: 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 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

740 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