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. Endless Mouse Move Events

Endless Mouse Move Events

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

    I have an object of type UserControl that I occasionally have problems with. Normally, when I move the mouse over the object, windows will generate a mouse move event as advertized - only when the mouse moves. Occasionally, however, windows goes crazy on me and generates a gazillion mouse move events for as long as the mouse is over the object and it is not even moving. I get so many of these events that it inhibits the application from performing until I move the mouse off the object. Has anyone seen this type of behavior before and, if so, was there anything you could do about it? Darryl Borden Principal IT Analyst darryl.borden@elpaso.com

    L B 2 Replies Last reply
    0
    • D Darryl Borden

      I have an object of type UserControl that I occasionally have problems with. Normally, when I move the mouse over the object, windows will generate a mouse move event as advertized - only when the mouse moves. Occasionally, however, windows goes crazy on me and generates a gazillion mouse move events for as long as the mouse is over the object and it is not even moving. I get so many of these events that it inhibits the application from performing until I move the mouse off the object. Has anyone seen this type of behavior before and, if so, was there anything you could do about it? Darryl Borden Principal IT Analyst darryl.borden@elpaso.com

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      You are probably doing a wrong invalidate during the event handling, I have seen the same behaviour on the PropertyGrids TypeConvertors. top secret

      1 Reply Last reply
      0
      • D Darryl Borden

        I have an object of type UserControl that I occasionally have problems with. Normally, when I move the mouse over the object, windows will generate a mouse move event as advertized - only when the mouse moves. Occasionally, however, windows goes crazy on me and generates a gazillion mouse move events for as long as the mouse is over the object and it is not even moving. I get so many of these events that it inhibits the application from performing until I move the mouse off the object. Has anyone seen this type of behavior before and, if so, was there anything you could do about it? Darryl Borden Principal IT Analyst darryl.borden@elpaso.com

        B Offline
        B Offline
        Bryan White
        wrote on last edited by
        #3

        Yup - I've experienced it. It was an OpenGL control with mouse interaction, and didn't bother to work out WHY it happened - I just stopped it being a pain with following pseudocode: PointOrWhatever savedPosition; void HandleMouseEvent(whatever args) { if(args.position == savedPosition) return; DoMyMouseMovingStuff(); savedPosition = args.position; } Regards Brewman

        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