简体   繁体   中英

C#: Is it possible to monitor button clicks from an external Windows application?

I would like to monitor button clicks in an external Windows Forms application from my own application.

I have found examples that allow me to 'click' buttons in an external application (using Windows API), but this is not what I want to do.

The reason for this is that I would like to do some logging on an external application that a company made for us. They are willing to program the logging into that application, but it is overly expensive.

Can anyone help me with this?

Regards, Reinier

Usually this is done by installing a Windows hook. The API is SetWindowsHookEx (see http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx ). It's a really advanced task. The monitoring code can be implemented using .NET Framework and C# or VB.NET, but it would be better to use C or C++ for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM