locked
如何显示用户帮助 RRS feed

  • 问题

  • myappHelp.htm
    <html>
    <head>
    <META HTTP-EQUIV="Htm-Help" Content="critters.htm#Main_Contents">
    <KEYWORD VALUE="Critters;Games" TITLE="Critters Help" 
      HREF="Critters.htm#main_contents">
    <KEYWORD VALUE="Critters overview" TITLE="Critters Help" 
      HREF="Critters.htm#overview">
    <KEYWORD VALUE="Critters options" TITLE="Critters Help" 
      HREF="Critters.htm#options">
    </head>
    <body>
    <!-- PegHelp -->
    <p>
    <a name="Main_Contents"></a>
    </p>
    <b>Critters Help</b>
    </p>
    <p>
    <a href="critters.htm#overview">Game Overview</a><br>
    <a href="critters.htm#options">Game Options</a><br>
    <img src="critter.2bp">
    </p>
    <!-- PegHelp -->
    <!-- ******* TOPIC BREAK ******* -->
    <hr>
    <a name="overview"></a>
    <p><b>Game Overview</b></p>
    <p>Critters are small round creatures that you can adopt and raise.  
      They have various moods and characteristics and each one has its own 
      personality and appearance that will change over time.</p>
    <!-- PegHelp -->
    <!-- ******* TOPIC BREAK ******* -->
    <hr>
    <a name="options"></a>
    <p><b>Options</b></p>
    <ul>
    <li><i>Sound</i> – Turn sound on / off</li>
    <li><i>Sub-Games</i> – Turn sub-games on / off.  When a caretaker 
      attempts to play with a critter or teach a critter, sub-games are 
      presented such as ‘Guess my number’ and ‘Trivia’ if this option is 
      checked.</li>
    <li><i>Animation</i> – Turn animation on / off.  Turning this off will 
      cause the critter to remain still.</li>
    <li><i>Notifications</i> – Choose icon / text / none.  Notifications 
      appear to inform you when your critter is in danger of dying due to 
      a particular need not being met.</li>
    <li><i>Speed</i> – This is the rate at which the game engine operates.
      It affects how fast feelings develop and statistics are 
      modified.</li>
    </ul>
    </p>
    </body>
    </html>
    
    
    
    
    
    private void button1_Click(object sender, System.EventArgs e)
    {
        // You can also show Help
        // for a subtopic
        // by clicking a button.
        try
        {
            Help.ShowHelp(this,@"\windows\myappHelp.htm#overview");
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }
    
    2009年5月3日 13:51

答案

  • Hi,

    由于您没有表述清问题所在,我们只能根据您的code来做些分析。

    对于以下部分:

    try
        {
            Help.ShowHelp(this,@"\windows\myappHelp.htm#overview");
        }
    可以看出您在使用相对路径,那从MSDN文档来看,应当是:

    url
    Type: System..::.String
    The path and name of the Help file.

    The url parameter can be of the form C:\path\sample.chm or /folder/file.htm.

    请注意这边相对路径模式斜杠的方向。

    谢谢。

    2009年5月8日 8:12
    版主

全部回复

  • 完全没有看到您的问题是什么?


    I'm a device.
    2009年5月4日 13:53
    版主
  • Hi,

    由于您没有表述清问题所在,我们只能根据您的code来做些分析。

    对于以下部分:

    try
        {
            Help.ShowHelp(this,@"\windows\myappHelp.htm#overview");
        }
    可以看出您在使用相对路径,那从MSDN文档来看,应当是:

    url
    Type: System..::.String
    The path and name of the Help file.

    The url parameter can be of the form C:\path\sample.chm or /folder/file.htm.

    请注意这边相对路径模式斜杠的方向。

    谢谢。

    2009年5月8日 8:12
    版主