private void importFromClipboardToolStripMenuItem_Click(object sender, EventArgs e) { if (Clipboard.ContainsImage()) { m_Import = new Import((Bitmap)Clipboard.GetImage()); m_Import.ImagePicked += Picked; m_Import.Show(); } }
private void importToolStripMenuItem_Click(object sender, EventArgs e) { if (pal != null) { pal.Close(); } if (ofdImage.ShowDialog() == System.Windows.Forms.DialogResult.OK) { try { Bitmap test = new Bitmap(ofdImage.FileName); m_Import = new Import(test); m_Import.ImagePicked += Picked; m_Import.Show(); } catch { MessageBox.Show(this, "Not a Valid Picture", "I'm not good with computer"); } } }