bsSIZEABLE and no title bar

Xailer professional forum in English
Responder
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

bsSIZEABLE and no title bar

Mensaje por Timm »

Hi!

Is it possible to hide the title bar in a form that uses nBorderStyle = bsSIZEABLE?
I would like to create my own close, minimize and maximize buttons.

Greetings, Timm
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5707
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Re: bsSIZEABLE and no title bar

Mensaje por jfgimenez »

Hi Timm,

test this project ;-)
Sizeable.zip
(2.34 KiB) Descargado 110 veces
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

Re: bsSIZEABLE and no title bar

Mensaje por Timm »

Hi José,

works great, many thanks!

Now I am facing two problems:
- The form overlaps the task bar. I solved it with ::nHeight := Screen:nClientHeight in FormShow, but perhaps there is a better way.
- I do not know how to make it movable with the mouse

Greetings, Timm
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5707
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Re: bsSIZEABLE and no title bar

Mensaje por jfgimenez »

Hi Timm,

just change HTCLIENT into HTCAPTION at the beginning of WMNCHitTest(). That way, it's possible to drag the form by clicking anywhere on it.

Also, take a look at TCalculator source code. There you can see how to limit the movement inside the screen edges (methods WMNCLButtonDown and WMMoving, both written in C at the bottom).
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder