CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 1999
    Posts
    26

    Message from Dll

    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


  2. #2
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,452

    Re: Message from Dll

    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


  3. #3
    Join Date
    Apr 2000
    Posts
    737

    Re: Message from Dll

    subclass your vb form. refer http://vblib.virtualave.net, there is a class module vbSubclassing in the DLL that ease your job.

    HTH


  4. #4
    Join Date
    Oct 1999
    Posts
    26

    Re: Message from Dll

    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


  5. #5
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,452

    Re: Message from Dll

    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


  6. #6
    Join Date
    May 2001
    Location
    Germany
    Posts
    1

    URL Correction - Re: Message from Dll


  7. #7
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,452

    URL Correction - Re: Message from Dll

    Thanks for the Correction! :-)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured