Bookstore

Recent

Author Topic: FORM1 not resizable  (Read 188 times)

Nera

  • Jr. Member
  • **
  • Posts: 68
FORM1 not resizable
« on: February 18, 2020, 03:53:15 pm »
Good morning everyone.
I would like to make my FORM1 not resizable. How can I do this?

Thanks.

Handoko

  • Hero Member
  • *****
  • Posts: 3434
  • My goal: build my own game engine using Lazarus
Re: FORM1 not resizable
« Reply #1 on: February 18, 2020, 04:10:10 pm »
Set the form's property BorderStyle := bsDialog;

Nera

  • Jr. Member
  • **
  • Posts: 68
Re: FORM1 not resizable
« Reply #2 on: February 18, 2020, 04:26:04 pm »
Set the form's property BorderStyle := bsDialog;


Very good.
 thanks.

lucamar

  • Hero Member
  • *****
  • Posts: 2579
Re: FORM1 not resizable
« Reply #3 on: February 18, 2020, 06:24:16 pm »
Any of these border styles will produce a "non user-resizable" form: bsNone, bsSingle, bsDialog, bsToolWindow. The differences between them are basically the presence or not of border/non-client area (bsNone vs. the rest) and the width and font size of the default non-client area (for all but bsNone).

From the help for TFormBorderStyle (somewhat edited):
Code: Pascal  [Select]
  1. type TFormBorderStyle = (
  2.   bsNone,       {No border at all.}
  3.   bsSingle,     {Standard border, the form cannot be resized.}
  4.   bsSizeable,   {The form can be resized (standard).}
  5.   bsDialog,     {The form is a dialog, cannot be resized.}
  6.   bsToolWindow, {Standard border, small caption, not resizeable.}
  7.   bsSizeToolWin {Small caption, form can be resized.}
  8. );
« Last Edit: February 18, 2020, 06:29:49 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.6/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.