Results 1 to 4 of 4

Thread: command line arguments when program is running

  1. #1

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    is it possible for your program to accept command line arguments while it is already running?
    sorta like winamp does, you enqueue a file while winamp is running and it adds the file to the playlist...

    that's pretty much what i want to do, right click on a file and add it to a listbox in my already running program, anyone got tha smarts?
    Generic vb 5

    Private Sub WakeMyAssUp( As Boolean)
    If Then : = False
    End Sub

  2. #2
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    I don't think u can pass command line parameters while program is running. what u can do is when u right click on a file..kill the current instance of ur program and start it with the new parameter. I don't know there is another way
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  3. #3
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    I do something similar in an application I wrote some time ago:

    I created a small exe, which is called, with the command line required.
    This does a FindWindow for the main application.
    If this exists then a DDE connection is established.
    If not present then the application is shelled, with the command line.
    The small exe then closes.

    In the main application the DDE enabled field (hidden Textbox) has the required function in the Change event.
    This is subseqently cleared, incase the same command is sent, therefore not changing the value.

    If you want a sample, Ask.

    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  4. #4

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    ah good, i thought all i was gonna get was u's and ur's...
    ya, i'd like to see it, zip 'er up and send it my way

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