Board index » cppbuilder » Another form minimise to taskbar question Pt2

Another form minimise to taskbar question Pt2

Hi ,

Re my last post - After a lot of playing around it turns out that I have
two auto created forms with fsStayOnTop style - these forms ( and this
style ) seem to be causing my focus and window stacking problems.

Has anybody any ideas why ?

Unfortunately I'm using the save dialog on one of my forms and ( I'm
guessing here ) when it's dynamically created it seems to be with the
fsStayOnTop style which causes the previously described problem to occur
again :-(

Modal forms also seem to shift the zorder of windows when displayed.

Are there any workarounds / suggestions ?

Thanks in advance.

Chris Postle

 

Re:Another form minimise to taskbar question Pt2


Hi Chris --

Quote
> Re my last post - After a lot of playing around it turns out that I have
> two auto created forms with fsStayOnTop style - these forms ( and this
> style ) seem to be causing my focus and window stacking problems.

Augment the CreateParams member function of the top-most secondary Forms, and
add the following...
    void __fastcall CreateParams(TCreateParams& AParams)
    {
        TForm::CreateParams(AParams);
        AParams.ExStyle = WS_EX_TOPMOST;
        AParams.WndParent = NULL;
    }

Good luck.

--
Damon Chandler (TeamB)
http://bcbcaq.freeservers.com

Re:Another form minimise to taskbar question Pt2


Hi Damon,

I'll try your suggestion,

Thanks

Quote
"Damon Chandler (TeamB)" wrote:
> Hi Chris --

> >Augment the CreateParams member function of the top-most secondary Forms, >and

> >add the following...

Other Threads