Get Image and Text from Clipboard both at a time

Madhu.b.rokkam
Posted by Madhu.b.rokkam under Windows Forms category on | Points: 40 | Views : 4051
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;
img.Save(@"C:\Users\Madhu\Pictures\vijay.jpg");
}


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

Comments or Responses

Login to post response