-
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?
-
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
-
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.
:cool:
-
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 :D