Hello. I want the image to slide to the right when I shear the image to the right with the mouse, or to the downward when I shear downward. I have "shearing" codes. But I need the x and y coordinates of the mouse. How can I get the coordinates (x and y) of mouse movements? (Not mouse click coordinates. It's like holding the mouse and dragging it.) Ex: ![83870-example.jpg][1] [1]: /answers/storage/attachments/83870-example.jpg Thank You! My Shearing Codes: Color WriteColor; Bitmap ExImage; ExImage= new Bitmap(pictureBox1.Image); int ImageWidth = ExImage.Width; int ImageHeight = ExImage.Height; double Bendingcoef = 0.5; double x2 = 0,y2 = 0; for (int x1 = 0; x1<(ImageWidth ); x1++) { for (int y1 = 0; y1<(ImageHeight ); y1++) { WriteColor = ExImage.GetPixel(x1, y1); //+X Direction Axis //x2 = x1 + Bendingcoef y1; //y2 = y1; // -X Direction of Axis //x2 = x1 - Bendingcoef y1; //y2 = y1; //+Y Direction Axis //x2 = x1; //y2 = Bendingcoef x1 + y1; //-Y Direction Axis x2 = x1; y2 = -Bendingcoef x1 + y1; if (x2 > 0 && x2 < ImageWidth && y2 >0 && y2<ImageHeight) ExImage.SetPixel((int)x2,(int)y2, WriteColor); } } pictureBox1.Image = ExImage;
