J
Jeffery Tyree
I am writing an application in C#.NET that is "AlwaysOnTop" and there should
only be one instance of this program running at any given time. The
"AlwaysOnTop" piece is working just fine but I need to know how to prevent
multiple instances of this program from running. I've been away from coding
for quite a while... Back in the old day with k&r C writing a Win3.x
application, I seem to remember being able to simply state somewhere whether
the program would or would not be a multiple-instance program and away you
went. Does such an easy parameter still exist? The only information I've
been able to find involves a bit of coding where a an 'App' class has to be
derived from UserApplicationContext. I did think about just running through
the currently running processes and comparing process handles. There must
be a simple straight forward way to accomplish this, yeah?
only be one instance of this program running at any given time. The
"AlwaysOnTop" piece is working just fine but I need to know how to prevent
multiple instances of this program from running. I've been away from coding
for quite a while... Back in the old day with k&r C writing a Win3.x
application, I seem to remember being able to simply state somewhere whether
the program would or would not be a multiple-instance program and away you
went. Does such an easy parameter still exist? The only information I've
been able to find involves a bit of coding where a an 'App' class has to be
derived from UserApplicationContext. I did think about just running through
the currently running processes and comparing process handles. There must
be a simple straight forward way to accomplish this, yeah?