Nicolò Blunda 3 Posted October 10, 2022 (edited) Hello. There is a way to detect Form OnMiximize event (to disable SizeGrip in a Status Bar)? I find a lot of pages for OnMiximize detection via TApplication object, but only for VCL developpment... Edited October 10, 2022 by Nicolò Blunda Share this post Link to post
weabow 6 Posted October 11, 2022 Put this in Resize event : TThread.ForceQueue(TThread.CurrentThread, procedure begin if ord(self.WindowState) = 2 then showmessage('wsMaximized '); end); Runs fine under Windows, not tested on MacOs or Linux. Hope this helps Share this post Link to post
Nicolò Blunda 3 Posted October 11, 2022 (edited) Thank you very much. Your code works on Windows but only to show message (like that your have insert). But if you want, for example, to show or hide control like this TThread.ForceQueue(TThread.CurrentThread, procedure begin if ord(self.WindowState) = 2 then labe1.visible:= false else labe1.visible:= true; end); code works only utlil maximization oparation is performed. When form is reset to original dimensions, code don't works. Regards. Edited October 11, 2022 by Nicolò Blunda Share this post Link to post
weabow 6 Posted October 12, 2022 Hello, Runs fine for me on a very new project... procedure TForm1.FormResize(Sender: TObject); begin TThread.ForceQueue(TThread.CurrentThread, procedure begin if ord(self.WindowState) = 2 then Label1.visible := false else Label1.visible := true; end); end; end. Share this post Link to post
weabow 6 Posted October 12, 2022 Tested right now on mac : runs fine too. Share this post Link to post
Nicolò Blunda 3 Posted October 12, 2022 Thank you very much. Maybe it is an effect of different Embarcadero RadStudio version? I work with 10.4... Share this post Link to post