A
Adam Nowotny
I want my application to be able to load most components it uses at user
logon (f.e. by running "prog.exe /startup") and create a NotifyIcon to
show up in tray.
Now when i load the prog.exe second time (without parameter) it should
detect that an instance is already running and tell it to show the main
form of the application (i need this to reduce application startup
time). Then the second instance should exit.
So far i've made a detection, if another instance is already running, by
using Process.GetProcessesByName.
The problem is how do i tell the first run prog.exe (from the second
one) to show all the forms ?
Using threading, appdomain (getdata?), writing lock file ?
logon (f.e. by running "prog.exe /startup") and create a NotifyIcon to
show up in tray.
Now when i load the prog.exe second time (without parameter) it should
detect that an instance is already running and tell it to show the main
form of the application (i need this to reduce application startup
time). Then the second instance should exit.
So far i've made a detection, if another instance is already running, by
using Process.GetProcessesByName.
The problem is how do i tell the first run prog.exe (from the second
one) to show all the forms ?
Using threading, appdomain (getdata?), writing lock file ?