This is not easy at all; and there is a part of it which is nearly impossible to achieve in VB6 (probably just impossible). This part requires writing a DLL should be written in C++. There are other options like Object Pascal (Delphi) or any other fully-fledged compiler which can work with raw Windows code and create DLLs. VB6 is not a "real" compiler, so this is not an option.
Capturing message is possible through installing
Windows Hooks. You can start from here:
http://msdn.microsoft.com/en-us/library/ms632589(v=vs.85).aspx[
^].
Now, according to Microsoft documentation on hooks, capturing messages dispatched to windows of other process requires installation of the hook through the function
SetWindowsHookEx
(see
http://msdn.microsoft.com/en-us/library/ms644990(v=vs.85).aspx[
^]) in a DLL. This is where VB6 limitations come into play.
My best advice would be: don't even try it, unless you have pretty serious software development experience on the level of raw Windows API and plenty of perseverance.
—SA