-1

I am encountering a problem in opening my help file when pressing o key. The help file is ok. My code in the form is this:

private void login_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.F1)
        {
            Help.ShowHelp(this, @"C:\Users\xristos\Desktop\Smartcity\Smartcityhelp.chm");
        }
    }

I checked many questions related to my problem, but for some reason, i still don't have the result i want. Thanks in advance!

Chris Tsiakoulas
  • 186
  • 5
  • 12

1 Answers1

1

Here is a good example of what you seem to be trying to do:

connect a help file to application

another solution from the Microsoft documentation:

https://msdn.microsoft.com/en-us/library/f7y1a1xy(v=vs.110).aspx

https://msdn.microsoft.com/en-us/library/81ee1k5y(v=vs.110).aspx

The second Microsoft documentation shows a line like this:

Help.ShowHelp(TextBox1, "file://c:\\charmap.chm");

Try adding "file://" to the beginning of your string and see if that works for you.

Community
  • 1
  • 1
Kaden.Goodell
  • 162
  • 1
  • 8