CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Guest

    com. b/n two applications

    Hello,
    Can i send a message to one of my application (SDI) from other(this is also my application, SDI).
    if so, can the first application listen to that?
    please somebody help me.
    Thanks,
    Sharath


  2. #2
    Join Date
    Oct 1999
    Location
    NV, USA
    Posts
    4

    Re: com. b/n two applications

    There can be many ways to this. It depends on what u'r application should do and the level of versatality that is needed. Two ways i can think of now
    1) use socket programming
    2) Use Windows API

    (2) Let us say both are .EXE files. Create dummy forms on the VBP. On load, push the frm's handle (.hWnd property) to the registry and identify it as the calling application's handle. Similarly, the other EXE writes to the registry and identifies itself as the called application handle. Use SendMessage using the Handles and u'll be able to do handshaking and control the functioning of u'r EXEs.

    Does this answer u'r question


  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: com. b/n two applications

    You might as well write them as Active-x Server Exe.
    By the way, is this supposed to be VC question, SDI and all that?!:-)

    RK

  4. #4
    Join Date
    Oct 1999
    Posts
    25

    Re: com. b/n two applications

    If they are running on the same machine, you can use windows messaging. You can also use an Active-X exe com object as an interface between the two apps. In the good old days you could use DDE, but I believe that was phased out.

    Sky 1000


  5. #5
    Join Date
    Aug 1999
    Location
    Bangalore, INDIA
    Posts
    70

    Re: com. b/n two applications

    Hi
    thanx for all the infromtion.
    and my app will be running on the same machine.
    right now i have this code in my main()


    If App.PrevInstance = true then
    AppActivate "MyApp"
    cmd$ = Command()
    If cmd$ = "1" then
    'here i need to call a function
    'of the prev instance
    else
    'here i need to call one more function
    'of the prev instance
    End If

    End
    End If



    regarding ActiveX stuff, i am neeewwww to vb programming.
    can you tell me where can i get a good sample program please.
    regards.
    Sharath




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