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 [modified]

mouse [modified]

Scheduled Pinned Locked Moved C#
performancequestion
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.
  • D Offline
    D Offline
    duta
    wrote on last edited by
    #1

    how the mouse works? If we move the mouse slower...the distance from desktop it's smaller than distance when we move mouse faster. I'm interested about relation between speed, acceleration and distance. any advice..links..tricks...?? thanks in advance -- modified at 18:33 Friday 11th May, 2007

    C 1 Reply Last reply
    0
    • D duta

      how the mouse works? If we move the mouse slower...the distance from desktop it's smaller than distance when we move mouse faster. I'm interested about relation between speed, acceleration and distance. any advice..links..tricks...?? thanks in advance -- modified at 18:33 Friday 11th May, 2007

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You need to use DateTime.NOw to time the interval between mouse messages and store the points. Once you have locations and times, you can work out acceleration, speed and distance.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      D 1 Reply Last reply
      0
      • C Christian Graus

        You need to use DateTime.NOw to time the interval between mouse messages and store the points. Once you have locations and times, you can work out acceleration, speed and distance.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        D Offline
        D Offline
        duta
        wrote on last edited by
        #3

        Computer mice must convert the motion of the mouse across a surface to the motion of the on-screen mouse pointer. The translation between the physical and on-screen motions is determined by an algorithm (a mathematical, two-dimensional function) that adjusts the rate to allow for both rapid and precise mouse targeting. When the mouse is moved a given distance slowly, the pointer will move a shorter distance than if the mouse is moved that same distance quickly. I'm interested about algorithm (physical motion vs on-screen motion)

        C 1 Reply Last reply
        0
        • D duta

          Computer mice must convert the motion of the mouse across a surface to the motion of the on-screen mouse pointer. The translation between the physical and on-screen motions is determined by an algorithm (a mathematical, two-dimensional function) that adjusts the rate to allow for both rapid and precise mouse targeting. When the mouse is moved a given distance slowly, the pointer will move a shorter distance than if the mouse is moved that same distance quickly. I'm interested about algorithm (physical motion vs on-screen motion)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          duta wrote:

          Computer mice must convert the motion of the mouse across a surface to the motion of the on-screen mouse pointer

          No, windows does that.

          duta wrote:

          I'm interested about algorithm (physical motion vs on-screen motion)

          All you're able to access is the rate of motion on the screen, Windows has already performed that conversion beforehand. It's not fixed, you can set the rate in your control panel settings

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          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