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. HelpRequested event

HelpRequested event

Scheduled Pinned Locked Moved C#
comdesignhelpquestion
9 Posts 2 Posters 1 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.
  • H Offline
    H Offline
    Hans Ruck
    wrote on last edited by
    #1

    Hi, I have a Windows form with a button on it. I have enabled the HelpButton property of the form and I have implemented the HelpRequested event for the button. Everything works fine as long as the button stays enabled. When disabled, the contextual help request simply doesn't work. Is there any workaround for this behaviour? Is it supposed to be by design?


    "you can't always get what you want"

    rechi

    N 1 Reply Last reply
    0
    • H Hans Ruck

      Hi, I have a Windows form with a button on it. I have enabled the HelpButton property of the form and I have implemented the HelpRequested event for the button. Everything works fine as long as the button stays enabled. When disabled, the contextual help request simply doesn't work. Is there any workaround for this behaviour? Is it supposed to be by design?


      "you can't always get what you want"

      rechi

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Bogdan Rechi wrote:

      Everything works fine as long as the button stays enabled. When disabled, the contextual help request simply doesn't work.

      I tried this and it worked for me. How the help button is disabled ?


      My Website | Ask smart questions

      H 1 Reply Last reply
      0
      • N N a v a n e e t h

        Bogdan Rechi wrote:

        Everything works fine as long as the button stays enabled. When disabled, the contextual help request simply doesn't work.

        I tried this and it worked for me. How the help button is disabled ?


        My Website | Ask smart questions

        H Offline
        H Offline
        Hans Ruck
        wrote on last edited by
        #3

        Thank you for the answer. Just set the Enabled property of the button to false...


        "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

        rechi

        N 1 Reply Last reply
        0
        • H Hans Ruck

          Thank you for the answer. Just set the Enabled property of the button to false...


          "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

          rechi

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Yes it fired the events in disabled mode too. I think you are missing something.


          My Website | Ask smart questions

          H 1 Reply Last reply
          0
          • N N a v a n e e t h

            Yes it fired the events in disabled mode too. I think you are missing something.


            My Website | Ask smart questions

            H Offline
            H Offline
            Hans Ruck
            wrote on last edited by
            #5

            I have no idea :confused: Are you using the 2.0 Framework?


            "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

            rechi

            N 1 Reply Last reply
            0
            • H Hans Ruck

              I have no idea :confused: Are you using the 2.0 Framework?


              "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

              rechi

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              No 1.1 . How come you came to know that it's not working ? Can you show me the helprequested event code ?


              My Website | Ask smart questions

              H 1 Reply Last reply
              0
              • N N a v a n e e t h

                No 1.1 . How come you came to know that it's not working ? Can you show me the helprequested event code ?


                My Website | Ask smart questions

                H Offline
                H Offline
                Hans Ruck
                wrote on last edited by
                #7

                There is nothing special with the case:

                private void button1\_HelpRequested(object sender, HelpEventArgs hlpevent)
                {
                	MessageBox.Show("ok");
                }
                
                this.button1.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.button1\_HelpRequested);
                

                I tested it on both of the frameworks (1.1 and 2.0) and still with the same result.


                "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

                rechi

                N 1 Reply Last reply
                0
                • H Hans Ruck

                  There is nothing special with the case:

                  private void button1\_HelpRequested(object sender, HelpEventArgs hlpevent)
                  {
                  	MessageBox.Show("ok");
                  }
                  
                  this.button1.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.button1\_HelpRequested);
                  

                  I tested it on both of the frameworks (1.1 and 2.0) and still with the same result.


                  "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

                  rechi

                  N Offline
                  N Offline
                  N a v a n e e t h
                  wrote on last edited by
                  #8

                  It's firing form's help event even though it's disabled. But it's not firing button's help event when it is disabled. I came to know that this is the default behavior.


                  My Website | Ask smart questions

                  H 1 Reply Last reply
                  0
                  • N N a v a n e e t h

                    It's firing form's help event even though it's disabled. But it's not firing button's help event when it is disabled. I came to know that this is the default behavior.


                    My Website | Ask smart questions

                    H Offline
                    H Offline
                    Hans Ruck
                    wrote on last edited by
                    #9

                    OK, thank you. It's better this way rather than not firing anything at all... :|


                    "la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"

                    rechi

                    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