Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionprocedure TPetiteFicheDansGrande.AgrandirPleinEcran (Sender: TObject); var rZoneTravail: TRect; begin { on mémorise le parent de la fiche } FFicheParente := Parent; { on sort la forme de sa fiche parente } Parent := nil; BorderStyle := bsDialog; Caption := Application.MainForm.Caption; OnClose := FermerPleinEcranMaximise; { on agrandit la fenêtre après avoir récupéré la hauteur de la barre des tâches windows } { WindowState := wsMaximized; ne fonctionne pas bien avec BorderStyle := bsDialog; il faudrait bsSingle } SystemParametersInfo (SPI_GETWORKAREA, 0, @rZoneTravail, 0); SetBounds (0, 0, Screen.Width, rZoneTravail.Bottom); end; { AgrandirPleinEcran } procedure TPetiteFicheDansGrande.FermerPleinEcranMaximise (Sender: TObject; var Action: TCloseAction); begin Action := caNone; { on évite la fermeture de la fenêtre } ReduirePleinEcran (Sender); { on réduit la fenêtre } end; { FermerPleinEcranMaximise } procedure TPetiteFicheDansGrande.ReduirePleinEcran (Sender: TObject); begin { on rétablit la fenêtre dans sa fiche parente originelle } WindoWState := wsNormal; BorderStyle := bsNone; Parent := FFicheParente; end; { ReduirePleinEcran }