G
Guest
I am programming in c# and making a windows forms application.
I don't want to make a windows service.
How can I make sure that only once instance of the application runs ?
If you try to run another instance , it should bring the running instance to
the foreground and exit itself.
The second thing that I want to achieve is as follows :
This UI will be scheduled to run at system startup. when I login , I can see
the
process running but with no UI, meaning its running in the background.
Now I try running another instance, this should bring the first instance to
the foreground.
Is it actually possible to bring the instance which does not show a UI to
bring to the foreground and show the window ?
I have tried ShowWindow and SetForeGroundWindow but with no success.
I really appreciate any help here.
Thanks,
Alok
I don't want to make a windows service.
How can I make sure that only once instance of the application runs ?
If you try to run another instance , it should bring the running instance to
the foreground and exit itself.
The second thing that I want to achieve is as follows :
This UI will be scheduled to run at system startup. when I login , I can see
the
process running but with no UI, meaning its running in the background.
Now I try running another instance, this should bring the first instance to
the foreground.
Is it actually possible to bring the instance which does not show a UI to
bring to the foreground and show the window ?
I have tried ShowWindow and SetForeGroundWindow but with no success.
I really appreciate any help here.
Thanks,
Alok