使用 Silverlight 打开 .exe

发布于 2024-12-22 03:08:04 字数 362 浏览 1 评论 0原文

我试图让 silverlight 打开屏幕键盘。我编写了一段代码,但它抛出了 System.InvalidOperationException。

 try
        {
            HtmlPage.Window.Eval("var myshell = new ActiveXObject( 'WScript.shell' ); myshell.run( '" + OSK + "' );");

        }
        catch (Exception ex)
        {
            textBox1.Items.Add(ex.ToString());
        }

我做错了什么?

Im trying to get silverlight to open the OnscreenKeyboard. I wrote a code but it is throwing a System.InvalidOperationException.

 try
        {
            HtmlPage.Window.Eval("var myshell = new ActiveXObject( 'WScript.shell' ); myshell.run( '" + OSK + "' );");

        }
        catch (Exception ex)
        {
            textBox1.Items.Add(ex.ToString());
        }

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌伤ぢ 2024-12-29 03:08:04

您被 IE 内置的安全功能阻止了。 Internet Explorer 只允许使用ActiveXObject 构造一些受信任的COM 对象。您能想象如果某个网站获得您想做的事情的许可,可能会造成严重破坏吗?

You are being blocked by the security built in to IE. Internet Explorer will only allow a few trusted COM objects to be constructed with ActiveXObject. Could you imagine the havoc that could be wrought if a website had the permission to do what you are trying to do?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文