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 Events

Mouse Events

Scheduled Pinned Locked Moved C#
csharptutorialquestion
5 Posts 3 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.
  • S Offline
    S Offline
    ShimiG
    wrote on last edited by
    #1

    Im trying now to get the coords of the mouse on the SCREEN out side my form i was thinking to use win32 WindowProc function on the desktop handler ( using getDesktopWindow() ) im familiar with using external functions like getDesktopWindow but i just have no clue how to use WindowProc function .. it suposed to get callback function or something how to do it in c# ??? thanks :)

    R S 2 Replies Last reply
    0
    • S ShimiG

      Im trying now to get the coords of the mouse on the SCREEN out side my form i was thinking to use win32 WindowProc function on the desktop handler ( using getDesktopWindow() ) im familiar with using external functions like getDesktopWindow but i just have no clue how to use WindowProc function .. it suposed to get callback function or something how to do it in c# ??? thanks :)

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      Have a look at System.Windows.Forms.Cursor.Position.

      S 1 Reply Last reply
      0
      • R Robert Rohde

        Have a look at System.Windows.Forms.Cursor.Position.

        S Offline
        S Offline
        ShimiG
        wrote on last edited by
        #3

        But it will only give me the position can i make a function which will catch mousemove event outside the window?

        S 1 Reply Last reply
        0
        • S ShimiG

          Im trying now to get the coords of the mouse on the SCREEN out side my form i was thinking to use win32 WindowProc function on the desktop handler ( using getDesktopWindow() ) im familiar with using external functions like getDesktopWindow but i just have no clue how to use WindowProc function .. it suposed to get callback function or something how to do it in c# ??? thanks :)

          S Offline
          S Offline
          Stefan Troschuetz
          wrote on last edited by
          #4

          Simply use System.Windows.Forms.Cursor.Position property.


          www.troschuetz.de

          1 Reply Last reply
          0
          • S ShimiG

            But it will only give me the position can i make a function which will catch mousemove event outside the window?

            S Offline
            S Offline
            Stefan Troschuetz
            wrote on last edited by
            #5

            Search for global hooks here on CodeProject and you'll find some articles that describe how to do what you're looking for.


            www.troschuetz.de

            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