Recent

Author Topic: Where to set the main form size?  (Read 2549 times)

iru

  • Sr. Member
  • ****
  • Posts: 321
Where to set the main form size?
« on: October 12, 2018, 02:46:47 am »
Gentlefolk,

I wish to set/jam the main form of an application to the full screen size  at program start.

There is plenty of example code on how to set the form size however where would I run this code?

Form create, activate, show, wherever????

Any help appreciated, Ian

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Where to set the main form size?
« Reply #1 on: October 12, 2018, 03:44:19 am »
Set property WindowState to wsMaximized at design-time and application will start maximized.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

iru

  • Sr. Member
  • ****
  • Posts: 321
Re: Where to set the main form size?
« Reply #2 on: October 12, 2018, 09:28:57 am »
Thank you for the response.

Environment: Linux Mint 19.

Setting WidowState and bsBorderStyle gave me a form which covered the desktop and left the task bar exposed and the form size was fixed.

The user can still grab the top of the form and move the form. Any suggestions on how to stop the form moving??

Ian.

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Where to set the main form size?
« Reply #3 on: October 12, 2018, 09:35:09 am »
Thank you for the response.

Environment: Linux Mint 19.

Setting WidowState and bsBorderStyle gave me a form which covered the desktop and left the task bar exposed and the form size was fixed.

The user can still grab the top of the form and move the form. Any suggestions on how to stop the form moving??

Ian.
1) Set  formstyle fsSystemStayOnTop to set the form on top of all normal forms/application.
2) Set BorderStyle to BsNone to remove all the border and the form caption on top to avoid moving.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Where to set the main form size?
« Reply #4 on: October 12, 2018, 11:55:43 am »
I understand. Try to set wsFullScreen instead of wsMaximized.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018