Try handling three events:
bool IsShearing = false;
Point OriginalCoordinates;
private void pictureBox1_MouseDown( object sender, MouseEventArgs e )
{
IsShearing = true;
OriginalCoordinates = e.Location;
}
private void pictureBox1_MouseMove( object sender, MouseEventArgs e )
{
if( IsShearing )
{
Point current_coordinates = e.Location;
Size movement = new Size( current_coordinates.X - OriginalCoordinates.X, current_coordinates.Y - OriginalCoordinates.Y );
// make the new image based on 'movement' value
// ...
}
}
private void pictureBox1_MouseUp( object sender, MouseEventArgs e )
{
if( IsShearing )
{
IsShearing = false;
// do some final operations, if any
// ...
}
}
You can also detect the clicked button and the keys like <Ctrl> or <Shift>, if needed.