private void bilinearToolStripMenuItem1_Click(object sender, EventArgs e) { if (img == null) // verify if the image is already opened { return; } Cursor = Cursors.Cross; // cross cursor //copy Undo Image imgUndo = img.Copy(); InputBox zoom = new InputBox("Zoom Level", decimalTextBox); mouseFlag = true; while (mouseFlag) { Application.DoEvents(); } zoom.ShowDialog(); float factor = Convert.ToSingle(zoom.ValueTextBox.Text); Cursor = Cursors.WaitCursor; // clock cursor ImageClass.Scale_point_xy_Bilinear(img, img.Copy(), factor, mouseX, mouseY); ImageViewer.Image = img.Bitmap; ImageViewer.Refresh(); // refresh image on the screen Cursor = Cursors.Default; // normal cursor }