How to get window messages received by other applications

Asked 2 years ago, Updated 2 years ago, 127 views

Thank you for your help.
Could you help me with the subject matter?

I am currently creating an application in VB.NET.

Launch another application B (e.g., .cmd.exe) in Process.start from the application A (WindowsForm application) you are creating.

Is there a way to get (confirm) the window message for application B in real time?

I'm trying to figure out if the GetMessage function in the WIN32 API is right, but I don't know how to implement it in VB.NET.

Thank you for your cooperation.

vb.net winapi

2022-09-30 14:40

1 Answers

Generally, you can hook it with SetWindowsHookEx.
However, when calling SetWindowsHookEx in Visual Basic.NET, VB cannot create a native DLL, so arguments are limited to low-level hooks WH_KEYBOARD_LL and WH_MUSE_LL.
Therefore, I think it is impossible to implement a net .NET application that hooks all messages.


2022-09-30 14:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.