Answered Open Clipboard failed

  • Monday, February 20, 2012 9:13 PM
     
     

    Hi,

    I'm trying to use the Clipboard interface from a metro app in C#. However, any method that I call from Clipboard (e.g. SetContent, GetContent) gives me the following error:

    OpenClipboard failed (CLIPBRD_E_CANT_OPEN).

    Any insight?

    Thanks.


    V

All Replies

  • Monday, February 20, 2012 9:27 PM
    Moderator
     
     Answered

    Are you trying to use the Clipboard in response to user input or is this being done in the background? The former should work (and does in my tests), but the latter shouldn't.

    --Rob

    • Marked As Answer by vsetlur Monday, February 20, 2012 9:34 PM
    •  
  • Monday, February 20, 2012 9:34 PM
     
     
    Thanks. I was trying to do it in the background. Doing it in response to a user input works.

    V