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 Position on startup

Mouse Position on startup

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

    Hey all. I am currently using a low level mousehook to retrieve the mouse position. I would like to know if there is a function in .NET 1.1 that will allow me to retrieve the mouse coordinates when a Form is created or the program starts. I don't think I can use mouse events unless I can programatically call an event (such as mouse move). I am new to C# so any help would be greatly appreciated. Thanks! Josh

    R 1 Reply Last reply
    0
    • S StyrofoamSUV

      Hey all. I am currently using a low level mousehook to retrieve the mouse position. I would like to know if there is a function in .NET 1.1 that will allow me to retrieve the mouse coordinates when a Form is created or the program starts. I don't think I can use mouse events unless I can programatically call an event (such as mouse move). I am new to C# so any help would be greatly appreciated. Thanks! Josh

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Josh, you can use Cursor.Position to determine the position of the mouse at any time. You don't need to handle an event in order to query this property. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

      S 1 Reply Last reply
      0
      • R Ravi Bhavnani

        Josh, you can use Cursor.Position to determine the position of the mouse at any time. You don't need to handle an event in order to query this property. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

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

        ahh right, the static instance of Cursor. I also found that Control.MousePosition works as well. Thanks for the help.

        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