only one copy of a program ruunning at once 
Author Message
 only one copy of a program ruunning at once

Hi all,
How can I ensure the user can only have one copy of a program running at once?

Help appreciated

Ed.



Fri, 20 May 2005 20:22:25 GMT  
 only one copy of a program ruunning at once
Check my kb for "instance"

--

Steve Parker

--------------------------------------------------
kb and download center at:
     www.par2.com
--------------------------------------------------

In Germany, they first came for the communists,
and I didn't speak up because I wasn't a
communist. Then they came for the Jews,
and I didn't speak up because I wasn't a
Jew.

Then they came for the trade unionists, and
I didn't speak up because I wasn't a trade
unionist.

Then they came for the Catholics and I
didn't speak up because I wasn't a Catholic.

Then they came for me -- and by that time there was nobody
left to speak up.
             ---- Rev. Martin Niemoller, 1945


Quote:
> Hi all,
> How can I ensure the user can only have one copy of a program running at
once?

> Help appreciated

> Ed.



Fri, 20 May 2005 20:52:03 GMT  
 only one copy of a program ruunning at once

Hai Ed,

Quote:
>How can I ensure the user can only have one copy of a program running at once?

In situation like this I use a file (e.g. system.tps) to write a flag
to it. When the application is started it first checks for the value
in that particulair field. When there is a value like 'started' it
means there is already a copy running so it is stopped (can be done
without opening a window). When there is no value in that field it
writes 'started' in that field and so blocking other copies. Don't
forget to clear the field when ending the application.

Regards,
Koen Tjoa
The Netherlands



Fri, 20 May 2005 21:32:51 GMT  
 only one copy of a program ruunning at once
... nice filename.

A Highlander fan I see <G>...

Charles Edmonds


Quote:
> To offer yet another answer...

> I have attached a txa of a module with two procedures in it that will
limit a
> program to 1 instance.   If there is another copy of the program running
it
> will bring it into focus.  If you need a hand with the API prototypes let
me
> know and I will post those too.

> Scott Sheen
> Sheen Consulting Solutions Inc.


> >Hi all,
> >How can I ensure the user can only have one copy of a program running at
once?

> >Help appreciated

> >Ed.



Sat, 21 May 2005 08:11:40 GMT  
 only one copy of a program ruunning at once
<BG>
Quote:

>... nice filename.

>A Highlander fan I see <G>...

>Charles Edmonds



>> To offer yet another answer...

>> I have attached a txa of a module with two procedures in it that will
>limit a
>> program to 1 instance.   If there is another copy of the program running
>it
>> will bring it into focus.  If you need a hand with the API prototypes let
>me
>> know and I will post those too.

>> Scott Sheen
>> Sheen Consulting Solutions Inc.


>> >Hi all,
>> >How can I ensure the user can only have one copy of a program running at
>once?

>> >Help appreciated

>> >Ed.



Sat, 21 May 2005 23:56:39 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to launch a program only once?

2. How do I close several programs at once

3. Okay once again I ask, Want to learn program with ada for OS2

4. Transaction Control (tcf) when there multiple copies of the app on one machine

5. Running Only One Copy

6. Copy a file from one location to another

7. copy data from one file to another (in Code)

8. Run only one copy of app ?

9. copy file from one directory to another directory

10. Print more then one copy

11. Copy a files from one directory to another...

12. copying one field to another

 

 
Powered by phpBB® Forum Software