Recent

Author Topic: Form out of screen  (Read 6794 times)

Riccardo Giuliani

  • New Member
  • *
  • Posts: 40
Form out of screen
« on: June 10, 2011, 12:50:09 pm »
Hi everybody!

I'm trying to design - on runtime - a form out of screen, making it appear slowly inside it.
Using Screen properties I get correct values, nevertheless form doesn't start from outside, but directly from the extreme screen positions near my coordinates.

Under win i can manage to get desired result (using specific functions), under linux (kubuntu 11.04) not yet.
Anybody knows how to?

Thanks

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4552
  • I like bugs.
Re: Form out of screen
« Reply #1 on: June 10, 2011, 01:05:21 pm »
Under win i can manage to get desired result (using specific functions), under linux (kubuntu 11.04) not yet.

This is a feature in KDE's window manager, not in Lazarus.
There may be a setting for it but I am not sure.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Form out of screen
« Reply #2 on: June 10, 2011, 01:07:04 pm »
 :) Works. (Linux + Qt , KDE4)
Code: [Select]
procedure TForm1.FormActivate(Sender: TObject);
begin
  Left:=1680;
  OnActivate:=nil;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  if Left>600 then Left:=Left-4
    else Timer1.Enabled:=False;
end;
Set Timer interval = 50 (ms).
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/

Riccardo Giuliani

  • New Member
  • *
  • Posts: 40
Re: Form out of screen
« Reply #3 on: June 10, 2011, 02:01:08 pm »
@ JuhaManninen
I see, thanks

@ Blaazen
Doesn't work: I used in my code left and top properties to adjust starting position. Checked yours with same result too. Thanks anyway

A friend of mine suggested me a simple idea: just set form's height to 0 and get it up step by step.  ;)

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: Form out of screen
« Reply #4 on: June 10, 2011, 02:18:46 pm »
Have you tried to use setbounds? and i think you need to show the form before you can move it from original position to out of screen.

Riccardo Giuliani

  • New Member
  • *
  • Posts: 40
Re: Form out of screen
« Reply #5 on: June 10, 2011, 02:26:48 pm »
Have you tried to use setbounds? and i think you need to show the form before you can move it from original position to out of screen.

Not setbounds directly, but top property has been used after form showed; to be sure i tried with a new form project, a button on, clickbutton event which i set form's position in. Nothing to do.

 

TinyPortal © 2005-2018