Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have tried everything in getting my own class called a.graphics.WrappedBmp out of the clipboad. Here is the current code which I thought was most likely to work:

string type= Clipboard.GetDataObject().GetFormats()[0];
a.graphics.WrappedBmp wb= (a.graphics.WrappedBmp)Clipboard.GetDataObject().GetData(this.selWB.GetType());

 

GetData(this.selWB.GetType()); is where my trouble is.

 

selWB is of type a.graphics.WrappedBmp.

and

GetFormats()[0] confirms that the data in the clipboard is of that type.

 

I have tried many things including different strings to represent the data type including the very one returned by GetFormats() and nothing works.

 

I have tried typeof(a.graphics.WrappedBmp) but to no success at all.

C#
  • *Experts*
Posted
Clipboard doesn't return the object on the clipboard, it returns a DataObject class which contains information about the object. Perhaps you should try looking at that in the MSDN. Plus, the MSDN has numerous samples about the clipboard.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...