CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2001
    Location
    India
    Posts
    6

    Pass information

    Hello,

    How can I pass an information from one .exe file to another.

    Ex:- If I select a picture name in one .exe file, the selected picture should be displayed from the picture box of another .exe file.

    Thankz


  2. #2
    Join Date
    Jun 2001
    Location
    Israel
    Posts
    228

    Re: Pass information

    you can pass it by command line. like:
    mydir\myprog.exe mypic.jpg

    ----------
    The @host is everywhere!
    ----------

  3. #3
    Join Date
    Jun 2001
    Location
    India
    Posts
    6

    Re: Pass information

    Thanks for u'r information.
    kindly brief me more details.


  4. #4
    Join Date
    Jun 2001
    Location
    Israel
    Posts
    228

    Re: Pass information

    try playing with that code:
    Sub CheckCommandLine()
    Dim sCmdLine as string
    sCmdLine = Trim$(LCase$(Command$))

    If Right$(sCmdLine, 4) <> ".exe" then
    End
    else
    MsgBox "file found!"
    'your call to a function goes here or
    'something else
    End If

    End Sub



    I haven't checked this code but i think it should work

    ----------
    The @host is everywhere!
    ----------

  5. #5
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Pass information

    If both executables are written by you, can I recommend passing information by sending a registered message?

    What you need to do is call RegisterWindowMessage() with the name of your message then send that message using the PostMessage() api call. The name of the file to load is stored in a global memory block whose adress is passed to the callee in th elParam parameter of that message.

    That's how windows does it...

    HTH,
    Duncan

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

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