Solved

Opening Help

Posted on 1999-01-10
6
173 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
  • 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
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.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

816 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now