Click to See Complete Forum and Search --> : Pass information
shridhark
June 30th, 2001, 01:35 AM
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
deghost
July 1st, 2001, 04:35 PM
you can pass it by command line. like:
mydir\myprog.exe mypic.jpg
----------
The @host is everywhere!
----------
shridhark
July 2nd, 2001, 05:05 AM
Thanks for u'r information.
kindly brief me more details.
deghost
July 2nd, 2001, 11:21 AM
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!
----------
Clearcode
July 2nd, 2001, 11:27 AM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.