Problems with clipboard : system.runtime.interopservices : The requested clipboard operation failed

D

Dennis

Greetings,

I am having a wierd problem with .net accessing the clipboard on
certain machines. The code copies the RTF formatted data from the
clipboard. I first try and retrieve the clipboard via the
Clipboard.GetDataObject call :

IDataObject ido = Clipboard.GetDataObject();

But the above call will return with the exception :
system.runtime.interopservices : The requested clipboard operation
failed.

This error occurs on one of four machines tested, all machines were
running Windows XP professional, service pack 1.

I then tried to get around the problem by creating a RichTextBox
control, and calling the Paste method. But it too had a problem on the
same machine, the Paste method would be called without an exception
being raised, but it would have nothing in its contents. I know there
is content in the clipboard, because I can then open up Wordpad, hit
Ctrl-P and there is the content that should have been in the rich text
box.

Any ideas?

Thanks in advance,
Dennis.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top