Domanda

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?

È stato utile?

Soluzione

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?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top