开发者

Access to the clipboard when copying content from a WebControl with a Silverlight-component in VB6

开发者 https://www.devze.com 2023-04-08 12:08 出处:网络
Little old school :) In VB6, I got a UserControl containing a SHDocVwCtl.WebBrowser. The page I am displaying contain开发者_如何学Pythons a Silverlight-component, and I want to be able to copy conten

Little old school :)

In VB6, I got a UserControl containing a SHDocVwCtl.WebBrowser. The page I am displaying contain开发者_如何学Pythons a Silverlight-component, and I want to be able to copy content (text) from the SL to the clipboard. For some reason this doesn't work out-of-the-box.

I searched the web and found a method for copying text from a html-page to the clipboard, using this command:

WebBrowser.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT

I was hoping that this would also work for copying content from SilverLight, but alas.

Anyone know how to resolve this issue?


Most operations that represent security risks (including file access and clipboard access) are restricted in Silverlight.

I gather you are trying to copy the web page and include Silverlight content from a SL control on that page? If so, forget it. Silverlight effectively renders as a bitmap into the webpage (just like Flash).

There is some limited support for clipboard copy/paste in Silverlight, but needs to be user triggered, so is unlikely to do what you seem to want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号