Solved

Opening Help

Posted on 1999-01-10
6
168 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Bigway
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

763 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

6 Experts available now in Live!

Get 1:1 Help Now