ComponentOne DynamicHelp for WinForms
Using DynamicHelp for WinForms / For Developers: Mapping at Design Time / Preparing C1DynamicHelp for Authoring Mode
In This Topic
    Preparing C1DynamicHelp for Authoring Mode
    In This Topic

    To allow Help authors to activate and deactivate C1DynamicHelp authoring mode so that they can map topics in your application, you have a wide variety of options. You can use anything from a special keystroke combination to a registry node that, if present, activates authoring mode.

    This example shows how to specify a keystroke combination.

    1. Specify a source Help file for C1DynamicHelp.
    2. Select your Form and set the KeyPreview property to True in the Properties window.
    3. Select View | Code so you can add code to override the OnKeyDown method and specify a keystroke combination to activate and deactivate authoring mode.
    4. Add the following code:

      To write code in Visual Basic

      Visual Basic
      Copy Code
      ' toggle authoring mode when the user hits Ctrl+Shift+A
      Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
          If (e.KeyCode = Keys.A And e.Control And e.Shift) Then
              C1DynamicHelp1.AuthoringMode = Not C1DynamicHelp1.AuthoringMode
          End If
          MyBase.OnKeyDown(e)
      End Sub
      

      To write code in C#

      C#
      Copy Code
      // toggle authoring mode when the user hits Ctrl+Shift+A
      override protected void OnKeyDown(KeyEventArgs e)
      {
          if (e.KeyCode == Keys.A && e.Control && e.Shift)
          {
              c1DynamicHelp1.AuthoringMode = !c1DynamicHelp1.AuthoringMode;
          }
          base.OnKeyDown(e);
      }
      

    C1DynamicHelp authoring mode will be activated or deactivated when the user presses the Ctrl+Shift+A keys.