locked
Issue to display help for the applicaton RRS feed

  • Question

  • Hi there,

    When I tried to display help in my application, I got exception, what I did is:

    1. Created htm file which included in CAB file, and deployed to Windows/help directory

    2. Use Help.ShowHelp(this.@"\Windows\Help\Memo.htm") to diplay the htm help file

    When deployed application, I see the Memo.htm file in the directory, but used above call. I got following exception

    NotSupportedException

    at Microsoft.AGL.Common.MISC.HandleAr()

    at System.Windows.Forms.Help.ShowHelp()

    at EasyMemo.Form1.menuItem7_Click() ...

    Would somebody provide some advice for the issue?

    Thanks,

    Stephen

     


    stephen88
    Tuesday, August 24, 2010 1:54 AM

Answers

  • hi Stephen,

    You need to use the Webrowser control in your form & navigate your help file path, see link below how to use this control..

    http://msdn.microsoft.com/en-us/library/ms229657.aspx

    Also  sample code snippet below :

            public void DisplayHelp()
            {
                try
                {
                    string helpFilePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\help.htm";
                    if (File.Exists(helpFilePath))
                    {
                        Uri objUri = new Uri(helpFilePath);
                        webbrowserHelp.Navigate(objUri);
                        webbrowserHelp.Visible = true;
                        webbrowserHelp.Focus();
                    }
                    else
                    {
                            // File not found 
                     }
               }
               catch()
               {
                           // your exception handling related code
                }
           } 

     

     

    Hope this might help you.


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    • Marked as answer by stephen88 Sunday, August 29, 2010 3:05 PM
    Thursday, August 26, 2010 9:47 AM

All replies

  • What's the platform do you use (Windows Mobile or Windows CE)? What's the version?
    Please mark the post that helps you, and unmark that does not. This benefits our community.
    Thursday, August 26, 2010 2:43 AM
  • Hi Stephen,

    follow one of  my this article for Help File Integration with Windows Mobile PPC.

    Hope this may be help.


    If you find my post is helpful for you then mark as a answer.
    Thursday, August 26, 2010 9:24 AM
  • hi Stephen,

    You need to use the Webrowser control in your form & navigate your help file path, see link below how to use this control..

    http://msdn.microsoft.com/en-us/library/ms229657.aspx

    Also  sample code snippet below :

            public void DisplayHelp()
            {
                try
                {
                    string helpFilePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\help.htm";
                    if (File.Exists(helpFilePath))
                    {
                        Uri objUri = new Uri(helpFilePath);
                        webbrowserHelp.Navigate(objUri);
                        webbrowserHelp.Visible = true;
                        webbrowserHelp.Focus();
                    }
                    else
                    {
                            // File not found 
                     }
               }
               catch()
               {
                           // your exception handling related code
                }
           } 

     

     

    Hope this might help you.


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    • Marked as answer by stephen88 Sunday, August 29, 2010 3:05 PM
    Thursday, August 26, 2010 9:47 AM
  • Hi,

    In Windows Mobile for Smartphone, and actually, I tried to create help in application, use a menu call and I verified, Memo.htm is deployed in that directory, but give me exception with no much extra infor.

    code as:

    private void menuItem7_Click(object sender, EventArgs e) {

    Help.ShowHelp(this.@"\Windows\Help\Memo.htm")

    }

    Regards,

    Stephen


    stephen88
    Friday, August 27, 2010 1:17 AM
  • Help.ShowHelp is not supported on Smartphone (a.k.a. Windows Mobile Standard). So find another way to show help (e.g. text files, or html files shown in the web browser).
    Please mark the post that helps you, and unmark that does not. This benefits our community.
    Friday, August 27, 2010 3:08 AM
  • Thanks all for help.
    stephen88
    Sunday, August 29, 2010 3:00 PM