It is this line that is activating with any F1 key combinations:
else // Any other command -> display table of contents
HtmlHelp(Application.MainForm.Handle, PChar(Application.HelpFile), HH_DISPLAY_TOC, 0)
So, what I need is to somehow check if the current form has an F1 combination shortcut, and if so, disable this line from executing. Is this possible?
A possible work-around is to use actions to handle the shortcut keys. I've found that actions tend to get keys before anything else, so you can use them to intercept keys that would otherwise be processed by controls and so forth.
I noticed that with Winhelp, the forms where Shift+F1 is not assigned to a shortcut also activates the help which is fine, so I need to emulate this somehow. Any ideas?
I discovered I'm also using F1 in a shortcut on one small form where the user can select 12 user-defined functions (F1 to F12), so I also need to disable F1 when it is assigned to a shortcut on the current form.
Again, assigning the key to an action /might/ get around this for you. Windows seems to be in control of sending the WM_HELP message to kick it all off though, so YMMV.
-- Corey Murtagh The Electric Monk "Quidquid latine dictum sit, altum viditur!" -- Message scanned by the Sheriff
_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
