By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,461 Members | 2,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,461 IT Pros & Developers. It's quick & easy.

How do I know that a program is already open

P: n/a
Hi,
I need to find how can I know that a program I am going to shell it is
already open.
This program uses an csv file that I need to refresh before shelling
the program, however if the csv file is already in use because the
program is open I cannot refresh it (kill it and rewrite it) and I do
not get any error message.
Right now I have a message the prompts the user to close the robot
software before opening it through the database. Is there a better
method?

I appreciate your help.

Stefania Scott
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
You could use the Windows API to see if the program is open.

This should get you started on checking to see if the program is open. The code here
checks to see if a copy of your database is already open, but you should be able to modify
it.

http://www.mvps.org/access/api/api0041.htm

You could also try to open the file with a lock and see if you get an error message back.
This will only work if the other program locks the file when opening it.

--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e**************************@posting.google.c om...
Hi,
I need to find how can I know that a program I am going to shell it is
already open.
This program uses an csv file that I need to refresh before shelling
the program, however if the csv file is already in use because the
program is open I cannot refresh it (kill it and rewrite it) and I do
not get any error message.
Right now I have a message the prompts the user to close the robot
software before opening it through the database. Is there a better
method?

I appreciate your help.

Stefania Scott

Nov 12 '05 #2

P: n/a
Wayne,
Thank you for yor reply.
I looked into another api call, that checks if an application is
running, which is all I need to do. However, for this to work I need
the class name of the application. How can I determine the class name
of an application?

The API call I a trying to use is:
http://www.mvps.org/access/api/api0007.htm

Thank you.

Stefania

"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:<CN*****************@newssvr17.news.prodigy.c om>...
You could use the Windows API to see if the program is open.

This should get you started on checking to see if the program is open. The code here
checks to see if a copy of your database is already open, but you should be able to modify
it.

http://www.mvps.org/access/api/api0041.htm

You could also try to open the file with a lock and see if you get an error message back.
This will only work if the other program locks the file when opening it.

--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e**************************@posting.google.c om...
Hi,
I need to find how can I know that a program I am going to shell it is
already open.
This program uses an csv file that I need to refresh before shelling
the program, however if the csv file is already in use because the
program is open I cannot refresh it (kill it and rewrite it) and I do
not get any error message.
Right now I have a message the prompts the user to close the robot
software before opening it through the database. Is there a better
method?

I appreciate your help.

Stefania Scott

Nov 12 '05 #3

P: n/a
You may have to check with the maker of the application.

--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e*************************@posting.google.co m...
Wayne,
Thank you for yor reply.
I looked into another api call, that checks if an application is
running, which is all I need to do. However, for this to work I need
the class name of the application. How can I determine the class name
of an application?

The API call I a trying to use is:
http://www.mvps.org/access/api/api0007.htm

Thank you.

Stefania

"Wayne Morgan" <co***************************@hotmail.com> wrote in message

news:<CN*****************@newssvr17.news.prodigy.c om>...
You could use the Windows API to see if the program is open.

This should get you started on checking to see if the program is open. The code here
checks to see if a copy of your database is already open, but you should be able to modify it.

http://www.mvps.org/access/api/api0041.htm

You could also try to open the file with a lock and see if you get an error message back. This will only work if the other program locks the file when opening it.

--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e**************************@posting.google.c om...
Hi,
I need to find how can I know that a program I am going to shell it is
already open.
This program uses an csv file that I need to refresh before shelling
the program, however if the csv file is already in use because the
program is open I cannot refresh it (kill it and rewrite it) and I do
not get any error message.
Right now I have a message the prompts the user to close the robot
software before opening it through the database. Is there a better
method?

I appreciate your help.

Stefania Scott

Nov 12 '05 #4

P: n/a
Dev and Terry wrote a little mini SPY program that you can use.
http://www.mvps.org/access/modules/mdl0032.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Wayne Morgan" <co***************************@hotmail.com> wrote in
message news:ex***************@newssvr23.news.prodigy.com. ..
You may have to check with the maker of the application.

--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e*************************@posting.google.co m...
Wayne,
Thank you for yor reply.
I looked into another api call, that checks if an application is
running, which is all I need to do. However, for this to work I need
the class name of the application. How can I determine the class name
of an application?

The API call I a trying to use is:
http://www.mvps.org/access/api/api0007.htm

Thank you.

Stefania

"Wayne Morgan" <co***************************@hotmail.com> wrote in
message news:<CN*****************@newssvr17.news.prodigy.c om>... You could use the Windows API to see if the program is open.

This should get you started on checking to see if the program is open. The code here checks to see if a copy of your database is already open, but you should be able to
modify
it.

http://www.mvps.org/access/api/api0041.htm

You could also try to open the file with a lock and see if you get
an error message
back. This will only work if the other program locks the file when

opening it.
--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e**************************@posting.google.c om...
> Hi,
> I need to find how can I know that a program I am going to shell it is > already open.
> This program uses an csv file that I need to refresh before shelling > the program, however if the csv file is already in use because the > program is open I cannot refresh it (kill it and rewrite it) and I do > not get any error message.
> Right now I have a message the prompts the user to close the robot > software before opening it through the database. Is there a better > method?
>
> I appreciate your help.
>
> Stefania Scott



Nov 12 '05 #5

P: n/a
Thanks Stephen,

I just downloaded it for myself.

--
Wayne Morgan
"Stephen Lebans" <St***********@mvps.org> wrote in message
news:ln********************@ursa-nb00s0.nbnet.nb.ca...
Dev and Terry wrote a little mini SPY program that you can use.
http://www.mvps.org/access/modules/mdl0032.htm

Nov 12 '05 #6

P: n/a
Thank you.

Stefania

"Stephen Lebans" <St***********@mvps.org> wrote in message news:<ln********************@ursa-nb00s0.nbnet.nb.ca>...
Dev and Terry wrote a little mini SPY program that you can use.
http://www.mvps.org/access/modules/mdl0032.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Wayne Morgan" <co***************************@hotmail.com> wrote in
message news:ex***************@newssvr23.news.prodigy.com. ..
You may have to check with the maker of the application.

--
Wayne Morgan
"Stefania Scott" <st******@u.arizona.edu> wrote in message
news:3e*************************@posting.google.co m...
Wayne,
Thank you for yor reply.
I looked into another api call, that checks if an application is
running, which is all I need to do. However, for this to work I need
the class name of the application. How can I determine the class name of an application?

The API call I a trying to use is:
http://www.mvps.org/access/api/api0007.htm

Thank you.

Stefania

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:<CN*****************@newssvr17.news.prodigy.c om>... > You could use the Windows API to see if the program is open.
>
> This should get you started on checking to see if the program is open. The code here > checks to see if a copy of your database is already open, but you should be able to
modify > it.
>
> http://www.mvps.org/access/api/api0041.htm
>
> You could also try to open the file with a lock and see if you get an error message
back. > This will only work if the other program locks the file when opening it. >
> --
> Wayne Morgan
>
>
> "Stefania Scott" <st******@u.arizona.edu> wrote in message
> news:3e**************************@posting.google.c om...
> > Hi,
> > I need to find how can I know that a program I am going to shell it is > > already open.
> > This program uses an csv file that I need to refresh before shelling > > the program, however if the csv file is already in use because the > > program is open I cannot refresh it (kill it and rewrite it) and I do > > not get any error message.
> > Right now I have a message the prompts the user to close the robot > > software before opening it through the database. Is there a better > > method?
> >
> > I appreciate your help.
> >
> > Stefania Scott


Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.