473,666 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I know that a program is already open

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
6 2581
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.ari zona.edu> wrote in message
news:3e******** *************** ***@posting.goo gle.com...
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
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******* **********@news svr17.news.prod igy.com>...
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.ari zona.edu> wrote in message
news:3e******** *************** ***@posting.goo gle.com...
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
You may have to check with the maker of the application.

--
Wayne Morgan
"Stefania Scott" <st******@u.ari zona.edu> wrote in message
news:3e******** *************** **@posting.goog le.com...
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******* **********@news svr17.news.prod igy.com>...
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.ari zona.edu> wrote in message
news:3e******** *************** ***@posting.goo gle.com...
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
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******** *******@newssvr 23.news.prodigy .com...
You may have to check with the maker of the application.

--
Wayne Morgan
"Stefania Scott" <st******@u.ari zona.edu> wrote in message
news:3e******** *************** **@posting.goog le.com...
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******* **********@news svr17.news.prod igy.com>... 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.ari zona.edu> wrote in message
news:3e******** *************** ***@posting.goo gle.com...
> 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
Thanks Stephen,

I just downloaded it for myself.

--
Wayne Morgan
"Stephen Lebans" <St***********@ mvps.org> wrote in message
news:ln******** ************@ur sa-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
Thank you.

Stefania

"Stephen Lebans" <St***********@ mvps.org> wrote in message news:<ln******* *************@u rsa-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******** *******@newssvr 23.news.prodigy .com...
You may have to check with the maker of the application.

--
Wayne Morgan
"Stefania Scott" <st******@u.ari zona.edu> wrote in message
news:3e******** *************** **@posting.goog le.com...
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******* **********@news svr17.news.prod igy.com>... > 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.ari zona.edu> wrote in message
> news:3e******** *************** ***@posting.goo gle.com...
> > 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2899
by: muser | last post by:
Karl this is albeit your program, in the program that you wrote for me I learned quite alot, i didn't realise I could return NULL for instance or even use functions without first declaring them, but this is where I'm encountering resistance, as all the bool functions are compiling with the error: local function definitions are illegal. I've never used using namespace std before and was wondering if you had created a header file in...
13
1391
by: Pie | last post by:
I like to have my program (running on my home machine) email me (wherever I am) whenever it reaches a certain mile-stone (finishes a phase of the simulation or runs into an interesting path in the simulation). I just like add the feature so it can email me the partial results. Is there a source code for something like this I can add to my program? Do I need an SMTP server code or can I use my current SMTP ISP smtp server to email myself?...
3
3947
by: P | last post by:
Hi, Access 2002. I use DoCmd.OpenForm attached to command buttons to open one form from another form. All forms are open in dialog mode. When a user tries to open a form already opened from a form in dialog mode, nothing happens as expected. I would like to inform the users that the form does not open because it is already opened in the background. What event do you suggest using for this? Thank you. P
2
4963
by: Gos | last post by:
Hi, I have a program that needs to open a list of attachments displayed on a ListView. I have used Process.Start method to open the files using their associated program. This works correctly if the file extention is associated with a process(program/application) already, but throws an exception when there is no associated process. I would like to display an "Open With.." dialog box where the user can choose a program to open the file.
2
268
by: nisha | last post by:
A#include<fstream.h> #include<conio.h> #include<stdio.h> #include<ctype.h>A #include<graphics.h> #include<process.h> fstream dat,dat1; float gsal,pf; char flname={"dsb"}; class emptax
1
2825
by: keri | last post by:
Hi, I use the below for the user to view their outlook calendar Sub DisplayInbox() Dim myolApp As Outlook.Application Dim myNameSpace As Outlook.NameSpace Dim myFolder As Outlook.MAPIFolder Set myolApp = CreateObject("Outlook.Application") Set myNameSpace = myolApp.GetNamespace("MAPI")
3
419
by: cs | last post by:
Hi, I'm new to C and would appreciate any feedback on the following program, asplit, which splits a file into 2 new files, putting a certain number of lines in the first file, and all the rest in the second file. Any comments as to non-portability, stylistic infelicities, outright bugs or anything else would be very much appreciated.
8
9974
by: midknight5 | last post by:
Heya everyone, I am a freshman in college and am taking C++. This is not a begging thread for someone to solve my problem because I am interested in learning this myself. So here is my question: I am constructing a program that opens a file that has the names of students in it. It must then list the students on the screen in this format. Last First Middle That much I have accomplished. It must then open up a file...
9
2911
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading the text files from the watched folder line by line into variables and then posting them to a SQL table. All of the code for the form is shown below. And it works fine except for 2 issues. First issue: In the Finally of the Try for teh SQL...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.