Multiple app windows activation not working correctly

后端 未结 3 1373
夕颜
夕颜 2021-02-11 01:39

I have a Delphi application that has a document browser as the main form. When the user opens a document, we open an editor window. We want to have each editor with a button on

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-11 02:29

    perhaps add this in the createparams

    Params.ExStyle := Params.ExStyle OR WS_EX_APPWINDOW;
    

    or try this anywhere in the code. I presonally use it on the forms .OnCreate event.

    SetWindowLong(Wnd, GWL_EXSTYLE, 
      GetWindowLong(Wnd, GWL_EXSTYLE) or WS_EX_APPWINDOW) ;
    

    the downside of this is that if the main form is minimized the other forms hide aswell, but restore when the main form does.

提交回复
热议问题