View Single Post
  #5 (permalink)  
Old 06-30-2009, 10:39 AM
JohnH's Avatar
JohnH JohnH is offline
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,322
Reputation: 1315
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Quote:
Originally Posted by oXiDe View Post
Problem with the Paste Method is it deletes the user's clipboard... We don't want that.. hmmm
The good practice in this case is to take what's there and put it back when you're done borrowing the users clipboard.
Code:
Dim o As IDataObject = Clipboard.GetDataObject
'borrow clipboard
Clipboard.SetDataObject(o)
Quote:
At the moment, we are coverting it into a WMF, then into RTF then into the RTB
...
I used the copy and paste method and received the exact same string
Are you sure it is the exact same? I also can load the image by setting the Rtf just fine. I noticed your string has upper case hex values, while the string produced by pasting the image has lower case hex. Did a test where I converted the hex data to upper and assigned Rtf, no problem with this also, the RTB just converts is to lower again when parsing the input data. Another difference is the string that is returned from Rtf property has linefeeds (not par's), but I can also confirm this don't affect the outcome. Apart from that I can't compare any differences, but you should make sure yours is.
__________________
Reply With Quote