i tried this but it’s not working. the check is never true and it’s never get inside.
private void pictureBoxImageToCrop_MouseLeave(object sender, EventArgs e)
{
// Check if the right mouse button is being held down
if ((Control.MouseButtons & MouseButtons.Left) == MouseButtons.Left)
{
// Perform the desired action when the right mouse button is held down
isDrawing = false;
// Additional actions can be added here if needed
}
isDrawing = false;
}
1