Message 1 of 9
F1 Help for addin only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am adding Help to my addin and want the F1 key to call my help file (CHM) for the whole form, not just for the control that has focus. I am using the following code which is working fine. My problem is that F1 triggers Revit's online help after calling mine. Is there a way to prevent this keystroke going on to Revit? Many thanks. Dale
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
// F1 for help on any control
if (keyData == (Keys.F1))
{
HelpClick();
// This keystroke was handled, don't pass to the control with the focus
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
______________
Yes, I'm Satoshi.