Click to See Complete Forum and Search --> : Calling an exe file
Wen Lie
Nov 8th, 1999, 10:26 AM
Dear All...
I wanna ask about something. I have to make a project which have functions to call another project (in exe file). How can I do that ???
And if I do that... when I compile my main project, will the other exe file join in my main project compilation ???
Thx...for all who answer my question...
Wen Lie.
QWERTY
Nov 8th, 1999, 10:38 AM
To open another app use Shell Function.
(Example from VB Help).
Private Sub Command1_Click()
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator.
End Sub
2. I don't think it will be in your compiled project.
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
[This message has been edited by QWERTY (edited 11-08-1999).]
DPearce
Nov 8th, 1999, 03:42 PM
I need to do the same thing. I heard on this BBS that you can use SendMessage (API) from one VB app to call the functions in another compiled EXE.
Can anyone give me some sample code to call a function in the second project (with parameters).
And a sample for the project being called? How do I make the app SendMessage aware?
SteveS
Nov 8th, 1999, 04:27 PM
Calling an Application from another application, I use DDE or NetDDE (with DDEShare).
I usually interface my VB code with Excel or SCADA systems.
You can use the 2 methods below if you know the Application, Topic and Item Name of the Destination Application
.LinkRequest
.LinkPoke
Another approach I have used is placing a Winsock control in each program and communicating through that.
Regards,
Steve.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.