Lazarus MDI application. lazarus / 21-General ---------------------------------------------------------------------- BSaidus · 2024-12-01 13:44 Hello, I think there is a bug, or non finished work on MDI application in lazarus/fpc.   for Exemple, I can not make a child (form)window in the sametime      Formstyle = fsMDIChild & disable the maximize button & borderstyle to BorderStyle i.e  This combinaison of params do not work ( it take only the first one).  self.FormStyle := fsMDIChild;  self.BorderStyle := bsSingle;  self.BorderIcons := [biSystemMenu, biMinimize]; So I wonder on how to make my child form not sizable and disactivate the maximize button and letting this form to be MDIChid. Thank you. ---------------------------------------------------------------------- jamie · 2024-12-01 15:17 Why not simply control the constraints in the OnConstraintResize event ? ---------------------------------------------------------------------- BSaidus · 2024-12-01 16:01 Quote from: jamie on December 01, 2024, 04:17:03 pmWhy not simply control the constraints in the OnConstraintResize event ? I did it, but the maximise button still visible, even when I use api windows to disactivate it, the MDIChild flag disapeare. thanks. ---------------------------------------------------------------------- jamie · 2024-12-01 16:07 you can make a customized window by using a TFRame. It will require you to draw your own border etc., but You can place a TPanel at the top with your own controls and manage the sizing of the window yourself.  the Work area, being the client can be another TPanel and so on.  what you don't get out of this is any menus that normally get attached to the Main parent window.  It's your choice but normally MDIchilds require those icons. ---------------------------------------------------------------------- jamie · 2024-12-01 16:28 You can try removing the "WS_MaximizeBox" using the GetWindowLongPtr and SetWindowLowPtr to change the value of the Window Style Field.   You first need to read it and then XOR the bit out.  jamie ---------------------------------------------------------------------- BSaidus · 2024-12-01 16:38 Quote from: jamie on December 01, 2024, 05:28:08 pmYou can try removing the "WS_MaximizeBox" using the GetWindowLongPtr and SetWindowLowPtr to change the value of the Window Style Field.   You first need to read it and then XOR the bit out.  jamie I did it, but when using this, the form will not be mdichild ---------------------------------------------------------------------- jamie · 2024-12-01 16:50 Do remember that MDI only works with windows, I don't think other widgets support it. So maybe consider making a custom borderless form which you can make a child of the MDI and add a TPANEL at the top for a Menu bar and another TPANEL as the client area.  At least with that, if you wanted to, you could make an MDI app that basically cross the pond useable. P.S.  I suppose you could always capture the NC_Paint message and paint over the ICON since you know how to disable the max size.  You can get the ICON info from the system to obtain the size etc. ---------------------------------------------------------------------- marcov · 2024-12-01 21:39 Afaik with Lazarus MDI first worked with QT.  Some work was done for Win32/GDI too, but I don't know if it works. ---------------------------------------------------------------------- Fred vS · 2024-12-02 10:25 For MDI application, mseide-msegui is the champion (and for many other things, if not all).