How to detect if an app is allready running?

F

feudalac!

Hello

How can i detect if my application is allready started?
if it is started, set focus to it else start it?

Thanks
 
F

feudalac!

Kevin said:
Thanks...

now i have the followinf problem:

in old VB i could set startup to be a form or submain

now i don't have SubMain on the list to set it as a startup of my
application...

but i found a checkbox 'make a single instance app'
i checked that and compiled the app...
now when i try to run the second instance an error accours and the first
instance is crashed...
 
K

Kevin Spencer

That's "Main" - not "SubMain".

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

What You Seek Is What You Get.
 
F

feudalac!

Kevin said:
That's "Main" - not "SubMain".
That's what i meant... it's a habbit of calling it sub main because it
can't be a function...

But still... it's not on the list... (i am rather new to VS2005 so i am
still finding things thet are not on the same place they were in VS6...)
 
K

Kevin Spencer

I wish I could help more, but I do almost no work in VB these days. I do
know that the IDE hides a lot of this stuff from you when working with VB
(NOT a good idea, IMHO). But I don't know exactly how it is hidden, or how
the IDE works with it.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

What You Seek Is What You Get.
 
F

feudalac!

Kevin said:
I wish I could help more, but I do almost no work in VB these days. I do
know that the IDE hides a lot of this stuff from you when working with VB
(NOT a good idea, IMHO). But I don't know exactly how it is hidden, or how
the IDE works with it.
yeah... not a good idea
 

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

Top