I have a main form and from it i am creating and showing a new form using
the Show method. The form does not have an owner.
It correctly appears on top of the main form but when i click it it goes
behind the main form. If I then go bring the form to the front
it is fine from that point forward. It is just the initial click after
creation.

I believe I have done what I describe here successfully in several apps
before but I cannot figure out what is wrong here. Does anyone have any
thoughts?

RE: New Form Goes Behind Main Form when clicked. by v-jetan

v-jetan
Tue May 17 02:46:20 CDT 2005

Hi Matt,

Thanks for your post!!

Yes, I think this issue is not a general reproduced one, which will not
occur in normal situation. Currently, I suggest you try the 2 steps below:
1. Move your project to another machine, does the problem go away?
2. Create another sample project, does this problem go away?

With the 2 tests above, we can determine if this problem is
machine-specific or project-specific.

If you can reproduce out this issue on another machine, I suggest you
provide some code snippet or a sample project for me to reproduce this
issue on my side. Then I can help you much better.

I will wait for your further feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Re: New Form Goes Behind Main Form when clicked. by Matt

Matt
Tue May 17 07:03:34 CDT 2005

The application in question is huge. So no, recreating it in a sample
application DOES NOT have the same effect. I've been doing
windows forms for a couple of years now and have never had this problem.

The application in question is being developed by a team of 10 people. We
all have this problem on our respective machines and it
continues in the installed product. I'm at a loss. The window is being
created on the ui thread and shown with Show. I'm at a loss.

""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
news:zc7uMSrWFHA.3052@TK2MSFTNGXA01.phx.gbl...
> Hi Matt,
>
> Thanks for your post!!
>
> Yes, I think this issue is not a general reproduced one, which will not
> occur in normal situation. Currently, I suggest you try the 2 steps below:
> 1. Move your project to another machine, does the problem go away?
> 2. Create another sample project, does this problem go away?
>
> With the 2 tests above, we can determine if this problem is
> machine-specific or project-specific.
>
> If you can reproduce out this issue on another machine, I suggest you
> provide some code snippet or a sample project for me to reproduce this
> issue on my side. Then I can help you much better.
>
> I will wait for your further feedback. Thanks
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



Re: New Form Goes Behind Main Form when clicked. by v-jetan

v-jetan
Wed May 18 05:08:19 CDT 2005

Hi Matt,

Thanks for you feedback.

Yes, I see, reproducing a deep problem in a large product is not very easy.
However, without the reproduce out on my side, the support I can provide
you is very limited.

At least we now can determine the problem is project-specific, and the
problem should occur in your code. Currently, I suggest you remove the
controls on your form one by one, then we can determine if certain control
may cause this problem. Also, you may comment your code snippet in your
project one by one until only a simplest form class left. With these 2
ways, we should can determine which block of code or certain control caused
this problem. Then we can place our focus on the problem code block or
control.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Re: New Form Goes Behind Main Form when clicked. by v-jetan

v-jetan
Thu May 19 20:37:56 CDT 2005

Hi Matt,

Have you tried my suggestion of removing your controls one-by-one? Is it
helpful to your problem? Please feel free to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.