Results 1 to 4 of 4

Thread: Calling an exe file

  1. #1

    Thread Starter
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Post

    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.

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    To open another app use Shell Function.
    (Example from VB Help).
    Code:
    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).]

  3. #3
    New Member
    Join Date
    Aug 1999
    Location
    Bucks
    Posts
    12

    Post

    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?

  4. #4
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    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.

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