Home All Groups Group Topic Archive Search About

How to detect if an app is allready running?

Author
7 Sep 2006 9:10 AM
feudalac!
Hello

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

Thanks


--
You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
   -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------

Author
7 Sep 2006 11:10 AM
Heinz K
Author
7 Sep 2006 11:20 AM
Kevin Spencer
Here's a good example:

http://www.codeproject.com/Purgatory/SingleInstanceExample.asp

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

What You Seek Is What You Get.

Show quote
"feudalac!" <feuda***@gmail.com> wrote in message
news:edon13$gk0$1@ss408.t-com.hr...
> Hello
>
> How can i detect if my application is allready started?
> if it is started, set focus to it else start it?
>
> Thanks
>
>
> --
> You're not paid to think. A mindless worker is a happy worker. Shut up and
> do your job!
>   -  Tata Feudalac!
>
> --------------------------------------------------------
> http://www.fotozine.org/index.php?stranica=clan&uid=1352
> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
> http://groups.google.com/group/fejkneraddangub
> --------------------------------------------------------
Author
7 Sep 2006 12:16 PM
feudalac!
Kevin Spencer wrote:
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...




--
You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
   -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------
Author
7 Sep 2006 2:49 PM
Kevin Spencer
That's "Main" - not "SubMain".

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

What You Seek Is What You Get.

Show quote
"feudalac!" <feuda***@gmail.com> wrote in message
news:edp1u6$gjg$1@ss408.t-com.hr...
> Kevin Spencer wrote:
>> Here's a good example:
>>
>> http://www.codeproject.com/Purgatory/SingleInstanceExample.asp
>>
> 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...
>
>
>
>
> --
> You're not paid to think. A mindless worker is a happy worker. Shut up and
> do your job!
>   -  Tata Feudalac!
>
> --------------------------------------------------------
> http://www.fotozine.org/index.php?stranica=clan&uid=1352
> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
> http://groups.google.com/group/fejkneraddangub
> --------------------------------------------------------
Author
7 Sep 2006 6:26 PM
feudalac!
Kevin Spencer wrote:
> 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...)

--
You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
   -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------
Author
7 Sep 2006 7:29 PM
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.

Show quote
"feudalac!" <feuda***@gmail.com> wrote in message
news:edpo8o$et7$1@ss408.t-com.hr...
> Kevin Spencer wrote:
>> 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...)
>
> --
> You're not paid to think. A mindless worker is a happy worker. Shut up and
> do your job!
>   -  Tata Feudalac!
>
> --------------------------------------------------------
> http://www.fotozine.org/index.php?stranica=clan&uid=1352
> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
> http://groups.google.com/group/fejkneraddangub
> --------------------------------------------------------
Author
8 Sep 2006 6:29 AM
feudalac!
Kevin Spencer wrote:
> 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

--
You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
   -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------

AddThis Social Bookmark Button