Recent

Author Topic: Project takes the whole screen instead of a window  (Read 855 times)

udihamudi

  • New Member
  • *
  • Posts: 12
Project takes the whole screen instead of a window
« on: September 26, 2022, 02:27:56 am »
Hi!

My project used to open as window and not take the whole screen, now it takes the whole screen and cannot be resized, the only way to close it now is from the Windows status bar by right-clicking close window. Not sure what happened I probably checked some wrong box in the build options..

Any ideas?

Thanks!

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Project takes the whole screen instead of a window
« Reply #1 on: September 26, 2022, 02:41:48 am »
Change the WINDOWSTATE property, it's near the bottom.

Set it for wsNormal.

That's my guess
The only true wisdom is knowing you know nothing

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2061
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Project takes the whole screen instead of a window
« Reply #2 on: September 26, 2022, 09:12:58 am »
If you didnt understand above, open your Project, select in Object Inspector the main Form, within properties you find like jamie said the WindowState property.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

udihamudi

  • New Member
  • *
  • Posts: 12
Re: Project takes the whole screen instead of a window
« Reply #3 on: September 26, 2022, 01:49:32 pm »
Thanks! took me a while to find the object inspector, I guess F11 is the only way :) anyway I changed as indicated above but still the same-

As you can see the form take the full screen, it actually exceeds the screen so I don't see the top left etc. so can't even click the x at the right corner




udihamudi

  • New Member
  • *
  • Posts: 12
Re: Project takes the whole screen instead of a window
« Reply #4 on: September 26, 2022, 01:52:44 pm »
This is how the good original form before I re-compiled looked like -

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: Project takes the whole screen instead of a window
« Reply #5 on: September 26, 2022, 03:44:24 pm »
do you run it on Linux, Android, Windows, MacOS, ... ?

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: Project takes the whole screen instead of a window
« Reply #6 on: September 26, 2022, 03:53:42 pm »
Change the WINDOWSTATE property, it's near the bottom.

Set it for wsNormal.

Also, there are other properties with the form:

.Align
.Height
.Width
.Position

Someone recently complained somethign abot docking library, like it was making all hist forms to have alClient align

udihamudi

  • New Member
  • *
  • Posts: 12
Re: Project takes the whole screen instead of a window
« Reply #7 on: September 26, 2022, 05:03:03 pm »
Thanks, no just simple Windows 10, and weird the first time I compiled it was showing ok, next time I compiled and afterword its having this issue and I cannot get it back to look normal ... I didn't change anything

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: Project takes the whole screen instead of a window
« Reply #8 on: September 26, 2022, 05:34:05 pm »
check those 4 options above have reaosnable values

aliign should be None, and position something like ScreenCneter or MainformCenter

an width/height of reasonable size

----

you can also try tools like Window Detective / WinSpy / Microsoft Spy++ / WinSight32 to check OS-level properties o Window to maybe have some clue. But i do not feel it would be easy help.

----

> exceeds the screen so I don't see the top left etc. so can't even click the x at the right corner

you still can resize form keyboard. Used to be Alt+F7 but they removed ll the hotkeys later, only Alt-F4 remained of them all.
still, you can Alt+Space or Alt+Dash, choose resize from menu, choose bottom-right corner (arrows), move it up/left and press enter.
« Last Edit: September 26, 2022, 05:38:25 pm by Arioch »

udihamudi

  • New Member
  • *
  • Posts: 12
Re: Project takes the whole screen instead of a window
« Reply #9 on: September 26, 2022, 08:30:34 pm »
That did it, thanks! Apparently because of the screen dimensions on my laptop the project window was messed up, once I reduced width and height I could see the whole project window, resize etc. Granted the different tabs/sub-windows are now little messed up but at least I can resize them as well. I Wish these sub-windows were automatically resized according to some relationship to the parent.. anyway I can live with it now.

Thanks!

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: Project takes the whole screen instead of a window
« Reply #10 on: September 26, 2022, 08:39:41 pm »
I Wish these sub-windows were automatically resized according to some relationship to the parent.. anyway I can live with it now.

That is what Align property is about in child controls. And also BorderSpacing  (in Delphi VCL similar one is called Margins)
And ChildSizing in parents/containers.
Delphi tutorial: https://www.youtube.com/watch?v=hrDqpOVIMl8

Alternatively you can use Anchors, they are more flexible than Align. Though my Delphi experience taught me they are less reliable, so i prefer not to use them, and instead do with Align and border-less TPanel

 

TinyPortal © 2005-2018