Form on a form lazarus / 7-LCL ---------------------------------------------------------------------- JanH · 2006-06-07 07:01 Hi there, I want to show a form on a panel in my main form. This works, but then I can't work with my main form until the "sub form" is closed. Has anyone an idea for a workaround or solution? Or is it possible to create frames which can dynamically added to a form? Regards ---------------------------------------------------------------------- Lord_ZealoN · 2006-06-07 07:07 This is named MDI and not is supported yet. ---------------------------------------------------------------------- Christian · 2006-11-01 10:54 @Lord_ZealoN: he asked for an workaround ... here is it :   TfMain = class(TForm)         ...        {$IFDEF MSWINDOWS}     procedure WndProc(var TheMessage : TLMessage);override;     {$ENDIF}   private     .... implementation ... {$IFDEF MSWINDOWS} procedure TFMain.WndProc(var TheMessage : TLMessage); begin   if TheMessage.Msg = $6 then     begin         Activate;         {MyComponentOnMainform}.SetFocus;     end;   inherited WndProc(TheMessage); end; {$ENDIF} ---------------------------------------------------------------------- JanH · 2006-11-03 09:33 Thanks for you sample. it works fine. I tried on laz. 0.9.19. without the workaround again: I found out, that if I tab though the components on my sub form the cursor jumps after the last into the first component on the main form. and if the focus once is on main form I can also work with it. but if I tab through the main form components so the cursor is again in the sub form the main form is inaccessable again. Some tests with your code shows that the Activate; in WndProc is not needed if a component is focused by {MyComponentOnMainform}.SetFocus;