?
=?ISO-8859-1?Q?M=E9sz=E1ros_Tam=E1s?=
Hi!
Can I save and restore the content of the clipboard without dealing with
the format it stores? I use the clipboard for data exchange between
applications (this is the only way), and I would like to keep the
previous content of the clipboard. Any examples I've found build on the
format of the data, but I can't now in advance, what type of data on the
clipboard will be. I can't even save and restore a part of simple
formatted text copied from winword. If I choose text format, I get
unformatted text back. If I choose Rich Text Format, I get the rtf
formatting text (eg. "{\rtf1\ansi\ansicpg1250\uc1\deff0\" ..., but not
the formatted text.
IDataObject ido = Clipboard.GetDataObject();
object savedData = ido.GetData(DataFormats.Rtf, true);
....Using clipboard for data exchange
Clipboard.SetDataObject(savedData, true);
And what if there is a bitmap or other kind of data on the clipboard?
How could I save and restore them?
Could someone send me a link where I could find solution for my problem,
or tell me what I could do?
Thank's
Tamas Meszaros
Can I save and restore the content of the clipboard without dealing with
the format it stores? I use the clipboard for data exchange between
applications (this is the only way), and I would like to keep the
previous content of the clipboard. Any examples I've found build on the
format of the data, but I can't now in advance, what type of data on the
clipboard will be. I can't even save and restore a part of simple
formatted text copied from winword. If I choose text format, I get
unformatted text back. If I choose Rich Text Format, I get the rtf
formatting text (eg. "{\rtf1\ansi\ansicpg1250\uc1\deff0\" ..., but not
the formatted text.
IDataObject ido = Clipboard.GetDataObject();
object savedData = ido.GetData(DataFormats.Rtf, true);
....Using clipboard for data exchange
Clipboard.SetDataObject(savedData, true);
And what if there is a bitmap or other kind of data on the clipboard?
How could I save and restore them?
Could someone send me a link where I could find solution for my problem,
or tell me what I could do?
Thank's
Tamas Meszaros