C # /. NET - view a list of system events, i.e. Windows that were displayed, buttons that were pressed, etc.

I'm completely new to C # and the .NET Framework, so forgive me if this is a dumb question.

Is there a way to view a list of all events that occurred on a Windows system as a result of keystrokes and mouse movements, etc.? So, for example, when I click on the "Start" menu, the "Start" menu is displayed or when I click on the "Apply" button in the settings submenu, the settings are applied.

Is there any part of the .NET platform that will allow me to view all these events / actions and record them through a C # program? Any help I really liked! Thanks in advance.

+4
source share
2 answers

The UI Automation API is what you need. There are several types of handlers for listen automation events: AutomationEventHandler , StructureChangedEventHandler, and 2 more.

There is another way for native windows: global mice and keyboards. See the SetWindowsHookEx function .

+1
source

# , . , , , . , . , , ; IE , .

0

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


All Articles