标签云

微信群

扫码加入我们

WeChat QR Code

I am writing a contact management program. I know how to read command-line arguments, and perform different methods based on what I find.For example, program.exe "John Doe" will start a new instance of the program and open up the first contact it finds named John Doe, program.exe -s John will start a new instance of the program and search for contacts named "John," whereas simply running program.exe will open start a new instance of the program with a blank search screen.I would like to only run a single instance of the program, however. So when another program calls program.exe "John Doe", if there is already a process running, the arguments will be passed to that process and switch to a new search rather than opening a new window.I know that this requires looking for previously running processes and inter process communication, but I've not done much of either in .Net and am having trouble getting started in the right direction or finding any good tutorials on the specific subject.


Do you "own" program.exe, or does it belong to a third party?

2019年06月26日26分04秒

program.exe is the program I'm writing. It just doesn't have a name yet. So yes, I own it.

2019年06月25日26分04秒

Duplicate? stackoverflow.com/questions/917883/…

2019年06月25日26分04秒

John - Nice find.

2019年06月26日26分04秒

I didn't find it. Hasan Khan found it below.

2019年06月25日26分04秒