Results 1 to 10 of 10

Thread: [RESOLVED] Send message from one application to another in same computer

  1. #1

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Resolved [RESOLVED] Send message from one application to another in same computer

    Hi all,

    I've created two application in vb6 (let's say app1 and app2) and want to send/pass a message/text from app1 to app2.

    How can i do that?

    Thanks in advance.

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: Send message from one application to another in same computer

    You can use the FindWindow, FindWindowEx and SendMessage APIs.

    What type of message do you want to send?
    VB/Office Guru™ (AKA: Gangsta Yoda™ )
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    • Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Send message from one application to another in same computer

    What exactly do want to pass? You could also use command line arguments to pass data from one app to another. You can also use Dynamic Data Exchange

    Or use what RD has suggested.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,044

    Re: Send message from one application to another in same computer

    Or perhaps a textfile where both application can read/write...
    Regards,

    ™

    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,916

    Re: Send message from one application to another in same computer

    Or Winsock....
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  6. #6

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Send message from one application to another in same computer

    the first application will process some sort of tools and i need to send the status to another application every 200 milliseconds.

    Simply i need something like chat application. I don't want to send and receive. I just want to send to application 2 from application 1.

    I hope it is clear.

  7. #7

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Send message from one application to another in same computer

    One more thing, I forget...

    Both application will be running simultaneously in same system.

  8. #8
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    UK
    Posts
    417

    Re: Send message from one application to another in same computer

    Have you tryed uing AddAtom, FindAdtom, DeleteAtom, you can use them to pass stuff bac and forth between apps.
    Or use ActiveX, or as someone said above FindWindow, PostMessage, etc
    When your dreams come true.
    On error resume pulling hair out.

  9. #9

    Re: Send message from one application to another in same computer

    Quote Originally Posted by RobDog888
    You can use the FindWindow, FindWindowEx and SendMessage APIs.

    What type of message do you want to send?
    sounds like the best option to me.

  10. #10

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Send message from one application to another in same computer

    Quote Originally Posted by RobDog888
    You can use the FindWindow, FindWindowEx and SendMessage APIs.

    What type of message do you want to send?
    I don't know how this will work for me. For example, the app1 will send a message "I opened the VB forums web page... at 29-Apr-2006 00:03:09". This message should appear in a text box or some thing. After that app1 will send another message like "Classic Visual basic window is opened... at 29-Apr-2006 00:04:21", something like that. Now the app2 should display both the messages one by one in a text box or something. The app1 will send atleast 50 messages to max 100 messages after that both the applications will quit. That's it.

    Please suggest if you have any other good ideas. Basically the app1 will send some status to app2. app1 will be hidden. app2 is visible to the user.

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