Registering a C # application as a shell application

I need to register my WPF application as a shell application in order to restrict some functions in a standard WPF C # application.

Some examples of limiting functions: keys (Alt + F4, Ctrl + Alt + Del, etc.), mouse (right-click, etc.)

How can I do that?

+4
source share
1 answer

You cannot restrict Ctrl + Alt + Del using the shell application, but you can do this by changing the policy settings.

You can do this in C # using WMI. Take a look at the WMI Code Creator .

As for the Alt + F4 and Mouse events, if they are only in your application, again you do not need shell extensions. You can simply process your main OnClose window and return Cancel.

0
source

Source: https://habr.com/ru/post/1393528/


All Articles