private void buttonSnipTool_Click(object sender, EventArgs e) { this.WindowState = FormWindowState.Minimized; Image snip = FormODSnippingTool.Snip(); ShowImageAttachmentItemEdit(snip); this.WindowState = FormWindowState.Normal; }
public static Image Snip() { FormODSnippingTool snipper = new FormODSnippingTool(); //Ensure that the form is visible or the user will be very confused. snipper.WindowState = FormWindowState.Normal; snipper.TopMost = true; snipper.ShowDialog(); if (snipper.DialogResult == DialogResult.OK) { return(snipper.SnippedScreenshot); } return(null); }