views:

32

answers:

3

Hello World I am creating a financial software working on a touch panel machine. I have created a Keyboard control for User Input. I want to open start menu on my keyboard's Window button click. Please tell me hows that possible... Its very urgent

A: 

Hi there,

you can't send keystrokes from a Silverlight app to the OS, neither can you execute shell operations. Just remember that SL apps run in a browser. If you were able to do things like simulating keystrokes etc., that would be a serious security issue.

Cheers, Alex

alexander.biskop
A: 

Silverlight does not allow you to directly send commands to the OS, as it runs within a secure browser sandbox. Even when the application is running out-of-browser, the majority of the security restrictions remain.

There are workarounds, however. The simplest of these is to implement a service or native application that can execute the commands, and then connect to it from your Silverlight application with a TCP socket or similar.

Gareth Saul
A: 

I haven't used it but Silverlight 4 has COM interop for out of browser applications. Maybe you can use that. If not directly then another application or service can be installed with a COM api and the SL4 application can send commands to it and that in turn sends keystrokes.

Here is some idea on how to do it.
http://elegantcode.com/2010/02/20/silverlight-4-com-interop-and-the-cool-stuff-you-can-do-with-it/

Pratik