Results 1 to 5 of 5

Thread: Passing Values to EXEs

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 1999
    Location
    Avinashi, TamilNadu, India
    Posts
    20
    Hi All,
    I am using Visual Basic 6.0 (SP3). I have created two Standard EXE projects. I want one exe is called by another one. While calling i have to pass a value to the second exe which is being called. How can i pass the value from one exe to another exe? Thanks for any help.

    Sujatha
    Sujatha

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    If using standard exe's, you could pass the data in a command line.

    Code:
    Sub RunOtherApp()
        Dim sSendSomeData           As String
    
        sSendSomeData = "Here it is"
        Shell "SecondApp.exe " & sSendSomeData
    End Sub
    Then in the second app to get the data

    Code:
    Private Sub Form_Load()
        Dim sGotSomeData            As String
    
        sGotSomeData = Command$
    End Sub

  3. #3
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122
    Hi,

    use command line parameters.

    Call of other exe:

    Code:
    shell "myprog.exe parameters"
    Get parameters in called EXE:

    Code:
    strParameterString = Command$
    Roger

  4. #4
    Guest
    Or you could always write to a file with one program and have the other read the information.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    OR use the Registry

    Or send messages

    Or use DDE
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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