Solved

Opening Help

Posted on 1999-01-10
6
182 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 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