Get Image and Text from Clipboard both at a time

Posted by Madhu.b.rokkam under Windows Forms category on | Points: 40 | Views : 4398
private void btnGet_Click(object sender, EventArgs e)
IDataObject dataobj = new DataObject();
dataobj = Clipboard.GetDataObject();
textBox.Text = dataobj.GetData(DataFormats.Text).ToString();
Image img = dataobj.GetData(DataFormats.Bitmap) as Image;

Gets the text into textbox and copies image to the path specified.

Comments or Responses

Login to post response