The Meadows

Fortnightly ravings of an idea man.

Contact me on Gmail. My address is superjodash.

View John Kemp's profile on LinkedIn

Programming

I’m trying to put some text on the clipboard using C# but kept getting an exception:

Requested clipboard operation did not succeed

In order to get around this, I put the following above the class declaration:

[PermissionSet(SecurityAction.Demand, Name = “FullTrust”)]
[ComVisibleAttribute(true)]

That seemed to take care of the problem.

I hope this helps somebody.

Ultralite Powered by Tumblr | Designed by:Doinwork