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. Determine Double-Click / Middle Click using low-level mouse hook?

Determine Double-Click / Middle Click using low-level mouse hook?

Scheduled Pinned Locked Moved C#
questioncsharpc++tutorial
4 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.
  • W Offline
    W Offline
    wienzzz
    wrote on last edited by
    #1

    hai, I have question since there were many article implementing low-level hooking in C#. i couldn't manage to find how to determine when we click the middle button or double-clicked the mouse using low-level mouse hook. is there any way / method to do that? i'm using unmanaged c++ dll wrapper (WilsonGlobalHook) from this site. thx

    X 1 Reply Last reply
    0
    • W wienzzz

      hai, I have question since there were many article implementing low-level hooking in C#. i couldn't manage to find how to determine when we click the middle button or double-clicked the mouse using low-level mouse hook. is there any way / method to do that? i'm using unmanaged c++ dll wrapper (WilsonGlobalHook) from this site. thx

      X Offline
      X Offline
      xfitr2
      wrote on last edited by
      #2

      Check out this article: http://www.codeproject.com/csharp/globalhook.asp[^] It has a MouseActivity Event that you can see which mouse button was clicked.

      W 1 Reply Last reply
      0
      • X xfitr2

        Check out this article: http://www.codeproject.com/csharp/globalhook.asp[^] It has a MouseActivity Event that you can see which mouse button was clicked.

        W Offline
        W Offline
        wienzzz
        wrote on last edited by
        #3

        thankz for the answer, but I have look throughout that article before, and those article/project only cover the "left" and "right" clicks button. any way to determine "middle" clicks? low-level hooking problem maybe?

        W 1 Reply Last reply
        0
        • W wienzzz

          thankz for the answer, but I have look throughout that article before, and those article/project only cover the "left" and "right" clicks button. any way to determine "middle" clicks? low-level hooking problem maybe?

          W Offline
          W Offline
          wienzzz
          wrote on last edited by
          #4

          Got it, I'm sorry before... the class I used only handle WM_LBUTTONDOWN / WMLBUTTONUP and WM_RBUTTONDOWN / WMRBUTTONUP.. so just modify the class a little bit and add WM_MBUTTONDOWN / MBUTTONUP and maybe the double click handler to modify it. yeah.. thankz a lot..

          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