New Form Goes Behind Main Form when clicked.

  • Thread starter Thread starter Matt C.
  • Start date Start date
M

Matt C.

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?
 
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.
 
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.
 
Back
Top