tags:

views:

85

answers:

1

Hey all, real strange one here.

I have a c# 3.5 forms app running on Server 2008 R2.

The application is MDI, with about 15 active forms on the screen at a time.

Periodically, I get into a situation where the application is "Stuck" on top, that is to say that I can't alt+tab to any other form, the task bar appears, but the other form does not come forward. The only way to get out of it is to hit Windows+D several times, this eventually shows the desktop, at which point I can clcik on one of the other running applications in the task bar. When I click on another application, it comes on top, but my application also becomes visable.

This seems to happen about 25% of the time where the application runs, and there does not seem to be any rhyme or reason to it.

I am not setting any control to be Top-Most or anything like that.

Anyone seen anything like this before?

A: 

I think I've seen this a few times with random applications, and I'm not sure how to fix it.

What I noticed is that the foreground app actually did lose focus, but the target app didn't gain focus. You can check this by seeing if the foreground app's title bar lost focus (grey, unless your colour scheme is different). To work around, switch back to the foreground app, then away again, and all should be well.

Jon Seigel