Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Context sensitive help

Status
Not open for further replies.

IoanaPirvu

Technical User
Apr 21, 2006
8
GB
Hi!
I have a little problem with context sensitive help. I have a .hlp file(SET HELP TO MyHelp.hlp) and I assigned context Id's for calling the file. But it doesn't work. But if I set WhatsThisHelp Property to true and assign a WhatsThisHelpId all works fine, as I want it to (pop-ups appear when I press F1).
I wonder what the problem is.

Thanks
 
So...I have a .hlp file and I want a popup to apear when I press F1, explaining the field whish has the focus.
What happens
- if I assign to the HelpContextID property the corresponding number from the .hlp file while the WhatsThisHelp property is set to false the following message appears: The topic does not exist. Contact your application vendor for an updated help file (129).
- if I set the WhatsThisHelp property to true keeping the HelpContextID the following message appears in a popup (instead of my topic)when pressing F1: " no help topic associated with this item"
- if I set the WhatsThisHelp property to true and assign to the WhatsThisHelpID the corresponding number from the .hlp file , no matter what the HelpContextID is, I get what I want: pressing F1 a popup window appears with the topic I want.

I know that it shoul work only assigning the HelpContextId, because WhatsThisHelp is for other ways to show help.
What should I do and what am I doing wrong?

Thanks a lot!
 

Hi Iona,

if I set the WhatsThisHelp property to true and assign to the WhatsThisHelpID the corresponding number from the .hlp file , no matter what the HelpContextID is, I get what I want: pressing F1 a popup window appears with the topic I want.

That's exactly what I do in my own applications, and it gives exactly the result I want. In fact, I don't know any other way of achieving that result.

In fact, I go a bit further. I have a custom WhatsThisHelp button on my main toolbar. When the user clicks on this, the mouse pointer changes to the WhatsThisHelp pointer; the user can click on a control and see the same popup as when they press F1. To achieve that, the Click event of the button calls the active form's WhatsThisMode method.

However, you don't really need to do that. If you just want to provide popup Help with F1, your approach is correct.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks a lot!
I thought I was doing something wrong because I do not use a Help button, but the F1 key.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top