Click here to Skip to main content
15,909,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using HelpProvider in my Windows Form project, and it's working except for the fact that if the user presses F1 multiple times, then multiple instances of the help window are launched. This is not very desirable. Is there a way to prevent multiple help windows, and simply give focus to the one help window if F1 is pressed?

Thanks for any help.
Posted

1 solution

OK, I found the problem, although I don't understand all. I was using Process.Start(); but then I saw an example using Help.ShowHelp(); This is the event handler for the dropdown help menu (not F1 key), so I don't know why it fixed the F1 key case as well, but it did. The multiple behavior is gone.

C#
private void menuItem6_Click(object sender, System.EventArgs e)
{
    //Process.Start("Flash_Help.chm");
    Help.ShowHelp(this, "Flash_Help.chm");
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900