Strange Behaviour of BringToFront (OneInstance)

T

Thorsten

Hi,

we have a (rather complex) .Net 1.0 CF application running on WindowsCE5.0
(no PPC).

To ensures that our app runs only once we use code based upon the
OneInstance sample from gotdotnet UserSamples. This seems to work fine BUT
bringing our application to the front doesn't always work:
OurApp running
ThirdPartyApp Launched
OurApp started again => bring to front has no effect => *BUG*

What Does work is:
OurApp running
ThirdPartyApp Launched
SimpleFormApp Launched
OurApp started again => bring to front works as expected !?!?!?

SimpleFormApp is really just an application with a simple form.

When using the sample apllication that comes with the OneInstance sample
everything works just fine. One difference I note is that on the sample I
see an "opening" and then a "closing" animation (growing/shrinking
rectangles) which I don't see on our application.

What is special about our main form is that it has the following settings:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

this.ControlBox = false;

this.MaximizeBox = false;

this.MinimizeBox = false;

this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

(but the OneInstance sample with the same settings works just fine, too)

Any ideas?
Thorsten
 

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