1 (edited by Delta 2021-12-18 03:40:50)

Topic: use script set form fit screen

I searched the forum, don't found a good example for form fit screen. But found many good ideas.
I changed the students example, shared on forum.
It still have a question, how use script to set form Sizeable. It can be set on form's Properties, but cann't set in script code.

Thanks.

Post's attachments

Attachment icon Students Test.zip 346.54 kb, 237 downloads since 2021-12-18 

2 (edited by sparrow 2021-12-18 18:36:32)

Re: use script set form fit screen

Hi
Form1.BorderStyle := bsSizeable; - on
or
Form1.BorderStyle := bsSingle; - off

Re: use script set form fit screen

There are two properties used for Form sizeable.
One is Sizeable, it can be set true or false. Another is BorderStyle, it can be set bsSingle, bsSizeable, etc.
If you set Sizeable is true, BorderStyle be set bsSizeable at the same time, vice versa.
You can write script set the BorderStyle, but cann't set Sizeable.
I want write script to set Sizeable.

Only set BorderStyle, the form can use mouse drag for size change, but donn't have the maximized button.

Re: use script set form fit screen

Hi,


Form1.BorderIcons := biSystemMenu + biMinimize + biMaximize;

Re: use script set form fit screen

sparrow wrote:

Hi,


Form1.BorderIcons := biSystemMenu + biMinimize + biMaximize;



Wow! You're the master, thank you for your guidance!
I have solved the problem.

//BorderIcons
//0 no Icons
//1 close
//3 biMinimize+close
//5 biMaximize+close
//7 biMinimize+biMaximize+close
Form1.BorderIcons := 7;

Re: use script set form fit screen

I am not a master, I am just reading the documentation.