Recent

Author Topic: Form Minimize/Restore Behaviour  (Read 2860 times)

goldenfox

  • New Member
  • *
  • Posts: 47
Form Minimize/Restore Behaviour
« on: May 23, 2012, 06:00:14 am »
Hello eveyone,

I'm having a little problem with form minimize and restore. It's not currently working right on my computer.

I'm using
Windows 7 32bit
Lazarus 1.1 rev 37399
fpc 2.7.1 rev 21311

Maybe I missed something here. Please see attached demo source.

Regards,

goldenfox.
« Last Edit: May 23, 2012, 07:27:14 am by goldenfox »

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: Form Minimize/Restore Behaviour
« Reply #1 on: May 23, 2012, 09:09:30 am »
The non-modal form launched with Button2 is immediately destroyed. So that is normal that you don't see anything. Try this:
Code: [Select]
procedure TForm1.Button2Click(Sender: TObject);
begin
  with TForm2.Create(nil) do
  try
    Show;
    ShowMessage('Form2 is visible');
  finally
    Free;
  end;
end;

Regarding the maximized window that is minimized and again maximized when clicking on the left icon is afaik not a LCL issue but a windows feature.

EDIT: just tried with MSAccess 2002 and the behavior is exactly the same: maximize->minimize->restore of a child window results in a maximized window.
« Last Edit: May 23, 2012, 09:31:29 am by ludob »

goldenfox

  • New Member
  • *
  • Posts: 47
Re: Form Minimize/Restore Behaviour
« Reply #2 on: May 23, 2012, 09:41:03 am »
Thanks for the help ludob.

I searched the bugtracker and it looks like there's a lot of unresolved issues related to forms which is similar to my problem. So I guess I will just leave this setup as is.

 

TinyPortal © 2005-2018