Click to See Complete Forum and Search --> : Message from Dll


Annu Ittyachen
May 21st, 2001, 06:31 AM
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

sotoasty
May 21st, 2001, 07:08 AM
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

cksiow
May 21st, 2001, 09:24 AM
subclass your vb form. refer http://vblib.virtualave.net, there is a class module vbSubclassing in the DLL that ease your job.

HTH

Annu Ittyachen
May 22nd, 2001, 12:17 AM
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

sotoasty
May 22nd, 2001, 07:22 AM
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

HelgeG
May 22nd, 2001, 08:13 AM
http://www.vbnotes.com/Tutorials/Hook/KeyHook.zip

sotoasty
May 22nd, 2001, 02:10 PM
Thanks for the Correction! :-)