"Alan T" <al*************@yahoo.com.auwrote in message
news:eV**************@TK2MSFTNGP02.phx.gbl...
What I am trying to do is my application will do a copy some text/graphics
into clipboard and paste to another document.
By exiting my application, I need to restore the clipboard status as
before my application started.
So the pc user does not know his clipboard has been changed.
The clipboard changes the moment you copy some data to it. Unless you have
some way to prevent the user from using his computer until your application
exits, you still have the risk of the user knowing that his clipboard has
been changed (and in particular, without his knowledge or consent and
possibly trashing, even if only temporarily, important data that he put
there on purpose).
Oliver's comments are exactly right. It is not appropriate to change the
clipboard without the user's explicit instruction. If you need to move data
from one document to another without the user's intervention, you need to do
so without using the clipboard. There should be no need to use the
clipboard anyway, and there are very good reasons not to for this purpose.
Pete