singleton

  • Thread starter Thread starter Nick C
  • Start date Start date
N

Nick C

Hi

I would like to implement a singleton in vb.net. The application only can be
run by one user at the time. Does anyone have any articles/samples that can
help me with this problem? thanks

N
 
Hi

I would like to implement a singleton in vb.net. The application only
can be run by one user at the time. Does anyone have any
articles/samples that can help me with this problem? thanks

Are you using VS.NET 2005? VS.NET 2005 Windows Form projects have the
ability to specify single instance or not.


Either way, take a look at using a Mutex. A mutex is a system wide
synchronization object - thus you can use it to check if there is a prior
instance of the object running.
 
This of course depends on whether the application accesses resources outside
the scope of your PC, or makes resources available to other
machines on the network or via. remoting. Its simple to make the
application itself "single instance" (i.e. one instance running on one PC),
simply in your project properties -> application -> single instance.
However if you want to block other machines from running at the same time,
you will need some kind of license management. This is my easily achieved
in my view by using hardware dongles.
 
Nick,

You got your answer from Duracel, however try to ask in your subjects what
you mean, what you ask is not a singleton.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Configuring custom controls in the development environment 2
singleton 10
singleton 2
Singleton Pattern & Serialization 3
Remoting questions 9
Thread safe singleton 11
Singleton with parameters? 4
Singleton Question 15

Back
Top