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. Mouse Left = Mouse Right

Mouse Left = Mouse Right

Scheduled Pinned Locked Moved C#
tutorial
11 Posts 4 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.
  • T Offline
    T Offline
    Tarik Guney
    wrote on last edited by
    #1

    Hi, If the users click mouse right button ,left button will be fired so how to equate mouse right button's action to mouse button left button's action. Thanks in advance.

    N D 2 Replies Last reply
    0
    • T Tarik Guney

      Hi, If the users click mouse right button ,left button will be fired so how to equate mouse right button's action to mouse button left button's action. Thanks in advance.

      N Offline
      N Offline
      Nisar Inamdar
      wrote on last edited by
      #2

      ;)Hi frnd, I don't get your problem.... Where this is happening? Nisar Inamdar.

      T 1 Reply Last reply
      0
      • N Nisar Inamdar

        ;)Hi frnd, I don't get your problem.... Where this is happening? Nisar Inamdar.

        T Offline
        T Offline
        Tarik Guney
        wrote on last edited by
        #3

        i know it is little complicated but i said what i said :) i mean i want what i said.If i can find a way to handle what i want,i can make it my project better.. Thanks in advance...

        1 Reply Last reply
        0
        • T Tarik Guney

          Hi, If the users click mouse right button ,left button will be fired so how to equate mouse right button's action to mouse button left button's action. Thanks in advance.

          D Offline
          D Offline
          Dan Neely
          wrote on last edited by
          #4

          Is this a problem you're trying to fix or a feature you're trying to implement?

          -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

          P 1 Reply Last reply
          0
          • D Dan Neely

            Is this a problem you're trying to fix or a feature you're trying to implement?

            -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            Sounds like it is something he is trying to implement. I would imagine just trapping the mouse click event and setting the Button property to the left button if this is possible... --modified Which I am not sure is possible since e.Button doesn't have a set property, only get...

            "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

            T D 2 Replies Last reply
            0
            • P Paul Conrad

              Sounds like it is something he is trying to implement. I would imagine just trapping the mouse click event and setting the Button property to the left button if this is possible... --modified Which I am not sure is possible since e.Button doesn't have a set property, only get...

              "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

              T Offline
              T Offline
              Tarik Guney
              wrote on last edited by
              #6

              well, we can use SendKeys class to implement for Mouse Keys.?

              P 1 Reply Last reply
              0
              • T Tarik Guney

                well, we can use SendKeys class to implement for Mouse Keys.?

                P Offline
                P Offline
                Paul Conrad
                wrote on last edited by
                #7

                SendKeys doesn't have anything that works with the mouse.

                "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                T 1 Reply Last reply
                0
                • P Paul Conrad

                  SendKeys doesn't have anything that works with the mouse.

                  "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                  T Offline
                  T Offline
                  Tarik Guney
                  wrote on last edited by
                  #8

                  Ok. if i wanted to call a function which is fired when mouse right button is clicked, how would i do that ? thanks in advance... atarikg...

                  P 1 Reply Last reply
                  0
                  • T Tarik Guney

                    Ok. if i wanted to call a function which is fired when mouse right button is clicked, how would i do that ? thanks in advance... atarikg...

                    P Offline
                    P Offline
                    Paul Conrad
                    wrote on last edited by
                    #9

                    Call the function from the MouseClick event... something like:

                    Private Sub Form1_MouseClick(ByVal sender As System.Object, _
                         ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseClick
                    
                         If e.Button = Windows.Forms.MouseButtons.Right Then
                    
                             yourFunctionHere
                    
                         End If
                    End Sub
                    

                    "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                    1 Reply Last reply
                    0
                    • P Paul Conrad

                      Sounds like it is something he is trying to implement. I would imagine just trapping the mouse click event and setting the Button property to the left button if this is possible... --modified Which I am not sure is possible since e.Button doesn't have a set property, only get...

                      "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                      D Offline
                      D Offline
                      Dan Neely
                      wrote on last edited by
                      #10

                      If you hook the mouse event you're able to play with the win32 data structures and make that sort of transform.

                      -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

                      P 1 Reply Last reply
                      0
                      • D Dan Neely

                        If you hook the mouse event you're able to play with the win32 data structures and make that sort of transform.

                        -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

                        P Offline
                        P Offline
                        Paul Conrad
                        wrote on last edited by
                        #11

                        That is what I was wondering, maybe the OP should try that. :-D

                        "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                        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