how to capture right click ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumuka
    New Member
    • Oct 2007
    • 38

    how to capture right click ...

    Hello ,

    I'm doing project in vb 6 and i have a flex grid now i need to right click on the cell of a flexgrid and after right click it should open a msgbox .The problem is what should i write in flxgrid Click event in order to capture right click of the mouse button.
    Please halp me with the code..

    Thanks in anticipation...
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by sumuka
    Hello ,

    I'm doing project in vb 6 and i have a flex grid now i need to right click on the cell of a flexgrid and after right click it should open a msgbox .The problem is what should i write in flxgrid Click event in order to capture right click of the mouse button.
    Please halp me with the code..

    Thanks in anticipation...
    In the event mousedown and mouseup you'll have the parameter Button, so if its 1 its the left one, 2 is for the right one.

    so just write in any of those events something like:

    if button = 2 then msgbox("Hello world")

    HTH

    Comment

    • sumuka
      New Member
      • Oct 2007
      • 38

      #3
      Originally posted by kadghar
      In the event mousedown and mouseup you'll have the parameter Button, so if its 1 its the left one, 2 is for the right one.

      so just write in any of those events something like:

      if button = 2 then msgbox("Hello world")

      HTH


      Thanks 4 replying but im not using any buttons here im using a flexgrid and when the user right clicks on the cells of 3rd column it should open the msgbox.
      how should i do this .

      Regards,

      Comment

      • sumuka
        New Member
        • Oct 2007
        • 38

        #4
        Originally posted by sumuka
        Thanks 4 replying but im not using any buttons here im using a flexgrid and when the user right clicks on the cells of 3rd column it should open the msgbox.
        how should i do this .

        Regards,

        Thank You so much it 's working like anything..
        It helped me a lot.
        Thanks once again.
        Last edited by Killer42; Oct 19 '07, 06:45 AM.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by sumuka
          Thanks 4 replying but im not using any buttons here im using a flexgrid and when the user right clicks on the cells of 3rd column it should open the msgbox.
          :) Priceless!

          That was "button" as in "mouse button". As in "right mouse button". Which is what you want to detect.

          EDIT: Nuts! You were too quick for me. :(

          Comment

          • kadghar
            Recognized Expert Top Contributor
            • Apr 2007
            • 1302

            #6
            All that was too weird for me.

            Im glad it helped.

            Comment

            • sumuka
              New Member
              • Oct 2007
              • 38

              #7
              Originally posted by kadghar
              All that was too weird for me.

              Im glad it helped.

              Hello everyone,

              I'm able to establish right click but now i need to achieve for left double click . The user has to left double click on the flex grid's cell and the msgbox is to be displayed .
              So how can i do this.

              Thanks in anticipation,

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Originally posted by sumuka
                I'm able to establish right click but now i need to achieve for left double click.
                You should be able to just use the DoubleClick event.

                Comment

                • sumuka
                  New Member
                  • Oct 2007
                  • 38

                  #9
                  Originally posted by Killer42
                  You should be able to just use the DoubleClick event.


                  Thanks a lot it's Working...
                  Thank you so much

                  Comment

                  • Killer42
                    Recognized Expert Expert
                    • Oct 2006
                    • 8429

                    #10
                    Originally posted by sumuka
                    Thanks a lot it's Working...
                    Thank you so much
                    Glad we could help. :)

                    Comment

                    Working...