PDA

View Full Version : Dialogs too 'on top'


DarrylT
01-17-2007, 08:02 AM
Hi,

I like how some of the auxiliary NT dialog and control windows stay on top of other NT windows, but they are also staying'on top' of windows from other applications when NT doesn't have focus, and on top of the Windows task bar. At this point (when not currently using NT, to check mail or something)they are a bit of a nuisance, covering content of non-NT windows/applications that currently have focus. Minimizing the window to which the auxiliary window is related doesn't minimize the auxiliary window. NT windows found to do this are the script editor Find/Replace, the Strategy Analyzer data window, and the Simulation connection trend slider (there may also be others I haven't run into yet). Any chance these auxiliary dialog and control windows can be changed so they stay on top of only NT windows and allow other applications that receive focus to cover them?

Thanks.

NinjaTrader_Dierk
01-17-2007, 08:14 AM
Sorry, this is a windows limitation: As a window is "Always on Top" = "TopMost" it does not losse this property as another app gets the focus.

DarrylT
01-17-2007, 08:27 AM
Hi Dierk,

Interesting - is this a limitation of CSharp or .NET? I've used (and developed) applications in other languages (Visual Basic) that are able to have windows top most in the current application, while allowing other applications to cover them. This style of window hierarchy seems a bit more cooperative, I'd be a bit surprised anddisappointed if Microsoft didn't continue tosupport such an approach in it's newest language and platform. Oddly enough, out of all the applications I use I've only seen this kind of too 'on top' behavior in NT....

Thanks.

NinjaTrader_Dierk
01-17-2007, 08:29 AM
We just set Form.TopMost=True.

DarrylT
01-18-2007, 01:19 AM
From the docs it looks like working with Form.OwnedForms may result in a less intrusive UI for NT:

"When a form is owned by another form, it is minimized and closed with the owner form. For example, if Form2 is owned by form Form1, if Form1 is closed or minimized, Form2 is also closed or minimized. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected."

I haven't tested this and am somewhat new to .NET, but from the above it appearsthe advantages are having auxiliary forms on top of their owners (as at present), and minimized with their owners (improvement from present). And I'm guessing (hoping) the owned forms of one application will not cover (be on top of) forms from another application when the other application has focus (I believe a big improvement).

Thanks.

NinjaTrader_Dierk
01-18-2007, 01:44 AM
Thanks for your suggestion. We'll add it to the list.