Shell Form dissapearing behind other Windows ?

Topics: CAB & Smart Client Software Factory
Feb 2, 2007 at 8:42 AM
Here's the problem : From the main shell form, a new View is opened in ModalWindows workspace. Closing down this View seems to push the Shell behind whichever Window on the desktop was in Focus previous the whole smartclient app firing up.

I don't know what's causing this, as an immediate solution I was considering a call to BringToFront() in the shell code, but I need to access that from somewhere lower in the custom code. I know the Shell can't see events so I need a handle to the Shell itself somehow , is that possible?
Feb 5, 2007 at 8:03 AM
i have still seen no solution to this, still don't know what's causing it.
Feb 8, 2007 at 2:38 PM
Edited Feb 8, 2007 at 2:39 PM
Have the same issue, not using the ModalWindows workspace, but opening forms manually using ShowDialog().

Finding out the "parent" form and assigning it to the new dialog form seems to at least make it aware of its parent, and when time comes, activates it.

I guess the problem is that the dialog is "parentless" (wich is a good design goal in itself), and no fix is made for keeping track on the real parent by CAB.

I'd appreciate an answer on this...

BR
JERKER
Feb 21, 2007 at 2:01 PM
does anyone have a solution to this?
Feb 21, 2007 at 3:59 PM
I'm not an expert at this, but... I recall the same thing in VB 6 if a form is displayed and it does not have a parent window, whatever helper code behind the scenes that runs when I close the window was bringing up seemingly random applications. If the parent window is set to my application window, and I think this works for modeless as well as modal forms/dialogs/message boxes, etc., then when that form/dialog/message box is closed, the parent gets activated.
So if you can set the parent of the ModalWindows workspace to be your Shell application when you create it (as JERKER mentions above, I'm not sure why this doesn't happen automatically...) that would be a work around for you.

Perhaps the CAB needs to be updated to either always set this parent, or at least give an easy way of specifying the parent when opening up the view...

I don't know the CAB or ModalWindows workspace well enough to comment on why it is not set for you or if this is by design or a bug...