[SOLVED] Application fullscreen lazarus / 31-LCL ---------------------------------------------------------------------- Pe3s · 2022-04-04 15:32 Hi can someone explain why some components like MPlayer stops working when we change WindowState. Is there any way to remedy this? ---------------------------------------------------------------------- Pe3s · 2022-04-06 10:28 Thanks. How can I hide and later show the title strap of the form, not changing WindowsTate? ---------------------------------------------------------------------- howardpc · 2022-04-06 12:15 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm2.HideBarButtonClick(Sender: TObject);begin  BorderStyle := bsNone;  RecreateWnd(Form2);end; procedure TForm2.ShowBarButtonClick(Sender: TObject);begin  BorderStyle := bsSizeable;  RecreateWnd(Form2);end; ---------------------------------------------------------------------- Pe3s · 2022-04-06 15:31 I made up this code to hide the title barCode: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  SetWindowLong(Handle, GWL_STYLE, WS_VISIBLE and (not WS_DLGFRAME)); SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, 0);  I have a problem how to restore the bar ? ---------------------------------------------------------------------- 440bx · 2022-04-06 16:39 Instead of using SetWindowLong and SetWindowPos,  I suggest you simply try ShowWindow with SW_HIDE/SW_SHOW. ---------------------------------------------------------------------- Pe3s · 2022-04-06 17:24 SW_SHOW / SW_HIDE is not suitable because I don't want to hide the form, just the title bar. The concept is to hide the title bar -> maximize form -> return to previous form setting dimensions -> show title bar ---------------------------------------------------------------------- 440bx · 2022-04-06 18:19 Now I understand what you're trying to do. There is an example that shows how to do that at https://forum.lazarus.freepascal.org/index.php/topic,53469.0.html look at the "SetWindowLong/SetWindowLongPtr" (which is in the attachment), it pretty much does what you want. HTH. ---------------------------------------------------------------------- Pe3s · 2022-04-08 15:05 How can I fix the code so that it remembers TWindowstate when the view is restored ?Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.MenuItem1Click(Sender: TObject);begin   SavedLeft := Left;   SavedHeight := Height;   SavedTop := Top;   SavedWidth := Width;   SavedWindowState := WindowState;    StyleOrg := GetWindowLongPtr(Handle, GWL_STYLE);    SetWindowLongPtr(Handle, GWL_STYLE, WS_DLGFRAME);   SetWindowPos(Handle, 0, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_FRAMECHANGED or SWP_SHOWWINDOW);    WindowState:= wsMaximized;end; procedure TForm1.MenuItem2Click(Sender: TObject);begin   WindowState := SavedWindowState;   Top := SavedTop;   Left := SavedLeft;   Width := SavedWidth;   Height := SavedHeight;    SetWindowLongPtr(Handle, GWL_STYLE, StyleOrg);   SetWindowPos(Handle, 0, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_FRAMECHANGED or SWP_SHOWWINDOW);    WindowState:= wsNormal;end; ---------------------------------------------------------------------- HeavyUser · 2022-04-08 17:56 Quote from: Pe3s on April 08, 2022, 05:05:02 pmHow can I fix the code so that it remembers TWindowstate when the view is restored It already saves the state its doesn't restore it though. ---------------------------------------------------------------------- Pe3s · 2022-04-08 18:19 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i WindowState := SavedWindowState;   Top := SavedTop;   Left := SavedLeft;   Width := SavedWidth;   Height := SavedHeight; it should read. How can I correct the code ---------------------------------------------------------------------- Pe3s · 2022-04-09 10:41 Hello, I have this problem that I am trying to solve, if I maximize the application and turn on the full screen and turn off the application returns to the point where it was maximized but I would like that when I return to the normal window it returns to the size of the previous set ?