Results 1 to 8 of 8

Thread: Communicating between 2 programs

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Communicating between 2 programs

    I'd like to be able to send text messages between programs.
    I've been searching the web and come up with lots of pieces of info
    like use DDE, use SendMessages, use Shared ActiveX exe ...
    but, no examples suitable for a neophyte.
    Does anyone have working, cut-n-paste VB code that does this?
    Thanks, DaveBo

  2. #2

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Whats neophyte? I have a sample using a shared ActiveX Exe on my website.

  4. #4
    jim mcnamara
    Guest
    Neophyte means new leaf - new kid on the block.

    You can use:

    SendMessage api
    Mutexes
    Semaphores
    Named pipes

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422
    filburt1, no I haven't tried that site. Thanks for the pointer.

    Edneeis, I copied your ActiveX sample and it works very well. Thanks. I have to say, I didn't appreciate your home page though.

    Jim m, FYI a neophyte is a new VB developer who gets frustrated by embarrassingly meaningless lists of buzzwords.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Passing event trigger to connected programs?

    I've gotten Edneeis' ActiveX connector/shared scheme working to
    pass info between programs, now
    how can I send an event through that same path?
    e.g. when one program instance has data changed and sends
    that to the shared object, I'd like it to force the other sharing
    programs to read that.

    I tried putting a method in the shared obj. that does a
    raiseevent etc. but I can't seem to get the WithEvents to work.
    When I try Public Withevents xyz as ExShared in the class
    module it apparently starts creating separate instances of the
    object for each program.
    The event fires, but only for the local/current program.

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The second example project below that one demonstrates this (SharedWithCallbacks). What you basicially do is set up a Notify object that is used in the client and can raise the events then just have Your object track and raise events through the notify object. This is called OLE callbacks. You could do it also by combining the idea of the Notify and Connector objects also.

  8. #8
    jim mcnamara
    Guest
    Dave - look up the etymology of neophyte - it literally means new leaf in Greek. It does mean newbie.

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