G
Guest
Hi,
I am pretty new to c# development / compact frame work so if this is a dumb
question I appologise.
I have a application that has multiple forms, the main form owns and
launches a splash screen, then once the loading is all done I ditch the
splash screen.
My problem is that during the start up it is possible for me to launch
multiple instances of my application.
I am quiet unsure why this is happening, I am doing the main loading of my
applications engine in the method called from the forms load event. It seems
that up to a certain point it is possible to create a new instances of the
application, but then after a certain point it brings the loaded instance to
the foreground rather than creating a new one.
I have been looking into a few ways to try and solve this and am familiair
with using named mutexes in other languages but it seems that this isn't
supported.
How is it possible to complish this in C# using the compact framework API.
I've tried using the method call
iMutex.WaitOne();
but all this does is stack up instances of my application until the current
application is killed.
I've seen a few postings in the news groups about using unmanaged code to
create the mutex, is this really the only solution ?
I hope my posting is clear and someone out there can explain where I am
going wrong.
thanks in advance
Guus Davidson
I am pretty new to c# development / compact frame work so if this is a dumb
question I appologise.
I have a application that has multiple forms, the main form owns and
launches a splash screen, then once the loading is all done I ditch the
splash screen.
My problem is that during the start up it is possible for me to launch
multiple instances of my application.
I am quiet unsure why this is happening, I am doing the main loading of my
applications engine in the method called from the forms load event. It seems
that up to a certain point it is possible to create a new instances of the
application, but then after a certain point it brings the loaded instance to
the foreground rather than creating a new one.
I have been looking into a few ways to try and solve this and am familiair
with using named mutexes in other languages but it seems that this isn't
supported.
How is it possible to complish this in C# using the compact framework API.
I've tried using the method call
iMutex.WaitOne();
but all this does is stack up instances of my application until the current
application is killed.
I've seen a few postings in the news groups about using unmanaged code to
create the mutex, is this really the only solution ?
I hope my posting is clear and someone out there can explain where I am
going wrong.
thanks in advance
Guus Davidson