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 pointer got arrested

Mouse pointer got arrested

Scheduled Pinned Locked Moved C#
helpgraphicsquestion
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.
  • M Offline
    M Offline
    mmxguy
    wrote on last edited by
    #1

    Hi, I'am developing an image viewer in which i got an image inside a picture box.On top of the image i'am drawing a rectangle.But once delete the rectangle drawn on the image the mouse pointer is getting arrested to the boundaries of the image.This problem comes when i delete the image using the context menu...The code i use 4 it is given below... foreach (Shape s in SelectedShapes) { Shapes.Remove(s); } SelectedShapes.Clear();//Clear the arraylist Invalidate(); This is not happening when i'am deleting the shape using the keyboard.But what is confusing me is that i have clled the same code as given above inside that also..The only diff is 'am checking whether the key press is DELETE or not. This problem also gets solved when i click once on the image after deleting the shape .. Kindly help me MMX

    H D 2 Replies Last reply
    0
    • M mmxguy

      Hi, I'am developing an image viewer in which i got an image inside a picture box.On top of the image i'am drawing a rectangle.But once delete the rectangle drawn on the image the mouse pointer is getting arrested to the boundaries of the image.This problem comes when i delete the image using the context menu...The code i use 4 it is given below... foreach (Shape s in SelectedShapes) { Shapes.Remove(s); } SelectedShapes.Clear();//Clear the arraylist Invalidate(); This is not happening when i'am deleting the shape using the keyboard.But what is confusing me is that i have clled the same code as given above inside that also..The only diff is 'am checking whether the key press is DELETE or not. This problem also gets solved when i click once on the image after deleting the shape .. Kindly help me MMX

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Make sure you're not setting the Cursor.Clip static property, as this clips (confines) the cursor's region in which to move around.

      Microsoft MVP, Visual C# My Articles

      1 Reply Last reply
      0
      • M mmxguy

        Hi, I'am developing an image viewer in which i got an image inside a picture box.On top of the image i'am drawing a rectangle.But once delete the rectangle drawn on the image the mouse pointer is getting arrested to the boundaries of the image.This problem comes when i delete the image using the context menu...The code i use 4 it is given below... foreach (Shape s in SelectedShapes) { Shapes.Remove(s); } SelectedShapes.Clear();//Clear the arraylist Invalidate(); This is not happening when i'am deleting the shape using the keyboard.But what is confusing me is that i have clled the same code as given above inside that also..The only diff is 'am checking whether the key press is DELETE or not. This problem also gets solved when i click once on the image after deleting the shape .. Kindly help me MMX

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Arrested?!:eek: For what? RageInTheMachine9532 "...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome

        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