Recent

Author Topic: Resizing an form without the native window border  (Read 6617 times)

Hydexon

  • Full Member
  • ***
  • Posts: 170
Resizing an form without the native window border
« on: March 05, 2011, 05:24:16 pm »
How to resize an form has a normal window when the BorderStyle property is bsNone?
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Resizing an form without the native window border
« Reply #1 on: March 05, 2011, 05:28:46 pm »
I suppose you must intercept MouseDown, MouseMove and MouseUp events and move the form accordingly.
Conscience is the debugger of the mind

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12618
  • Debugger - SynEdit - and more
    • wiki
Re: Resizing an form without the native window border
« Reply #2 on: March 05, 2011, 05:39:30 pm »
look at synedits syncompletion unit, there is a form in there that does it (so resizing only via an icon in the lower right edge)

Hydexon

  • Full Member
  • ***
  • Posts: 170
Re: Resizing an form without the native window border
« Reply #3 on: March 05, 2011, 06:13:11 pm »
I suppose you must intercept MouseDown, MouseMove and MouseUp events and move the form accordingly.

Moving no, resizing.
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Resizing an form without the native window border
« Reply #4 on: March 05, 2011, 08:57:09 pm »
It's almost the same, but it is easier to do just moving. I suggest you to try doing the movement first, and then try resizing.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018