Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

only one instance of app

Status
Not open for further replies.

markphsd

Programmer
Jun 24, 2002
758
US
I've been trying to get only one instance of my app to be allow run per computer.

I've tried this function:
winCheckMultipleInstances but on computers useing the runtime version, the function only reads part of the name of the title bar, where it says Database Version 2002-2003, not the full title.

Does anyone have any solution for this function or does anyone use any other solution?

thanks

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
This is interesting, because I don't see this behaviour with my databases:

-- I have DatabaseA open in Access
-- I double-click DatabaseA.mdb via Windows Explorer ... and I switch to the existing instance. Access does not start a second copy.

Here is my configuration ... my guess is that one of the differences between my set-up and yours, will be the cause of the different behaviour.

-- Windows XP home edition SP2
-- Access 2000 SP3
-- User and group security applied to databases via an MDW file
-- Advanced options set to:
---- Default open mode = Shared
---- Default record locking = Edited record
---- Open databases using record-level locking - Checked

I wonder if it is the use of user and group security? Maybe this information will give you some clues ...

Bob Stubbs
 
Well,

I have a application that starts another application. So it's more like, you double click databasea.mdb switch to it, switch back to explorer and double click databasea.mdb again.

If they click on the button multiple times, that starts the other app, and multiple clicks will start multiple instances.

I'd like to prevent all ways of opening an app multiple times. That's why i'm using the wincheckmultipleversions function.

thanks for your thoughts.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top