Hi,
I have created a dll in C++ from where I want to send a message "MyMessage". How do I catch this message from a VB application
Thanks in advance
Printable View
Hi,
I have created a dll in C++ from where I want to send a message "MyMessage". How do I catch this message from a VB application
Thanks in advance
If you are sending a non standard message, like "MyMessage" then you will need to subclass the window you are sending it to. If you need more help, Post back and I can post some code or a link for you.
Hope this helps
subclass your vb form. refer http://vblib.virtualave.net, there is a class module vbSubclassing in the DLL that ease your job.
HTH
Thanks for the quick response. I am new at VB and I tried but did not work. Maybe I am not doing it right. A link or sample code would be most helpful.
Thank you very much
Ok, Here is a link to a zip file that might help you. Basically, this is a C++ .DLL that monitors Key strokes, the sends a UserDefined message back to the VB program. There is a Control with in the project group, that sublcasses the main window, and looks for this message. To use this, make sure you open the project group KeyMonitor.vbg.
http://www.vbnotes.com/Tutorials/KeyHook.zip
If you have any more question let me know.
Hope this helps
Thanks for the Correction! :-)