Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Help requested event

Help requested event

Scheduled Pinned Locked Moved C#
helpdocker
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #1

    I have the help requested event set on my form only, but the event is firing one time for the control selected and for each container the control is in. ie form with a button on it and the button focused fires the event twice. Put the button inside a groupbox and the event fires three times. Etc. The problem is that if my help document is missing instead of one error message, i get multiple error messageboxes displayed. The sender is always the form object so I can't screen that way. Is there an option I'm not seeing that would allow me to prevent the multiple fires, or do I need to find a way to suppress the multiple messagebox.show() calls within my help controller class.

    -- Rules of thumb should not be taken for the whole hand.

    J 1 Reply Last reply
    0
    • D Dan Neely

      I have the help requested event set on my form only, but the event is firing one time for the control selected and for each container the control is in. ie form with a button on it and the button focused fires the event twice. Put the button inside a groupbox and the event fires three times. Etc. The problem is that if my help document is missing instead of one error message, i get multiple error messageboxes displayed. The sender is always the form object so I can't screen that way. Is there an option I'm not seeing that would allow me to prevent the multiple fires, or do I need to find a way to suppress the multiple messagebox.show() calls within my help controller class.

      -- Rules of thumb should not be taken for the whole hand.

      J Offline
      J Offline
      jonny5
      wrote on last edited by
      #2

      There is a Handled property on the HelpEventArgs passed into your HelpRequested event handler - just set Handled = true to prevent the event from continuing down the chain. The behaviour you are seeing is by design.

      Jon Humphreys ActivePlanet Software

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups