Mouse pointer got arrested
-
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
-
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
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
-
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
Arrested?!:eek: For what? RageInTheMachine9532 "...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome