none
Launch context sensitive help from local file to Micorsoft Edge

    Question

  • Hi Everyone,

    I have help files for application in html5 format (Generated by Flare), every time when user press F1, it will go to the right topic for all the browser except Microsoft Edge on windows 10.

    Here are how we did it:

    Start a new process with browser exe with arguments as "file:///c:\manuals\default.htm#cshid=1110"

    but for Microsoft Edge, we tried use:

    LaunchWinApp.exe "file:///c:\manuals\default.htm#cshid=1110" or

    microsoft-edge: "file:///c:\manuals\default.htm#cshid=1110"

    It does not go to the topic that specified by cshid=1110.

    Can someone point out how to do it?

    Thanks, Gordon

    Friday, April 7, 2017 2:35 PM

All replies

  • Hi Gorden888,

    Thank you for posting here.

    I do not have a good understanding about what you want.

    What is the type of your project?

    When I press F1 on Microsoft Edge, it will open a page about Microsoft Edge Tips. When I press in IE, it will open a page about Internet Explorer helper.

    What you want to show when press F1?

    Could you press some demo code for us?

    More details would be helpufl.

    Best Reagrds,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, April 10, 2017 7:59 AM
    Moderator
  • Hi Wendy,

    Thanks for the reply.

    When we press F1, we want the help topic related to the current user interface to show up.

    Here is the code:

    private static bool StartBrowerInstance(string browserPath, string url)
            {
                bool isSuccessful = false;
                if (string.IsNullOrWhiteSpace(browserPath) == false &&
                    string.IsNullOrWhiteSpace(url) == false)
                {
                    try
                    {
                        System.Diagnostics.Process process = new System.Diagnostics.Process();
                        process.StartInfo.UseShellExecute = true;
                        process.StartInfo.CreateNoWindow = true;
                        process.StartInfo.FileName = browserPath;
                        process.StartInfo.Arguments = AddDoubleQuotesToString(url);
                        process.StartInfo.Verb = "open";
                        process.Start();
                        isSuccessful = true;
                    }
                    catch (Exception)
                    {
                        isSuccessful = false;
                    }
                }
                return isSuccessful;
            }

    Parameter url will be something "file:///c:\Manuals\deffault.htm#cshid=1106". #cshid=1106 is the topics we want to open.

     If firefox is default browser, then we pass "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" for parameter "browserPath".

    It is working for all the browser except Microsoft Edge.

    Monday, April 10, 2017 2:27 PM
  • Have you tried a normal HTML page that is hosted in the INet to ensure that Edge is honoring any id tags when loading the page? It is possible Edge doesn't currently work with elements inside pages.
    Monday, April 10, 2017 2:44 PM
    Moderator